update and merged with latest master

This commit is contained in:
Manendra Pal Singh
2025-12-15 10:09:39 +05:30
25 changed files with 1009 additions and 107 deletions

View File

@@ -0,0 +1,18 @@
package definition
import (
"context"
"net/http"
)
// TransportWrapper is a plugin that wraps an http.RoundTripper,
// allowing modification of outbound requests (like adding auth).
type TransportWrapper interface {
// Wrap takes a base transport and returns a new transport that wraps it.
Wrap(base http.RoundTripper) http.RoundTripper
}
// TransportWrapperProvider defines the factory for a TransportWrapper.
type TransportWrapperProvider interface {
New(ctx context.Context, config map[string]any) (TransportWrapper, func(), error)
}