Versions in this module Expand all Collapse all v0 v0.94.0 Jan 17, 2024 Changes in this version + const BasicAuthenticationMiddlewareName + const ContextualMiddlewareName + const CustomHeadersMiddlewareName + const TracingMiddlewareName + var DefaultTimeoutOptions = TimeoutOptions + func GetTLSConfig(opts ...Options) (*tls.Config, error) + func GetTransport(opts ...Options) (http.RoundTripper, error) + func New(opts ...Options) (*http.Client, error) + func WithContextualMiddleware(parent context.Context, middlewares ...Middleware) context.Context + type BasicAuthOptions struct + Password string + User string + type ConfigureClientFunc func(opts Options, client *http.Client) + type ConfigureMiddlewareFunc func(opts Options, existingMiddleware []Middleware) []Middleware + type ConfigureTLSConfigFunc func(opts Options, tlsConfig *tls.Config) + type ConfigureTransportFunc func(opts Options, transport *http.Transport) + type Middleware interface + CreateMiddleware func(opts Options, next http.RoundTripper) http.RoundTripper + func BasicAuthenticationMiddleware() Middleware + func ContextualMiddleware() Middleware + func ContextualMiddlewareFromContext(ctx context.Context) []Middleware + func CustomHeadersMiddleware() Middleware + func DefaultMiddlewares() []Middleware + func NamedMiddlewareFunc(name string, fn MiddlewareFunc) Middleware + func TracingMiddleware(tracer trace.Tracer) Middleware + type MiddlewareFunc func(opts Options, next http.RoundTripper) http.RoundTripper + func (fn MiddlewareFunc) CreateMiddleware(opts Options, next http.RoundTripper) http.RoundTripper + type MiddlewareName interface + MiddlewareName func() string + type Options struct + BasicAuth *BasicAuthOptions + ConfigureClient ConfigureClientFunc + ConfigureMiddleware ConfigureMiddlewareFunc + ConfigureTLSConfig ConfigureTLSConfigFunc + ConfigureTransport ConfigureTransportFunc + CustomOptions map[string]interface{} + ForwardHTTPHeaders bool + Headers map[string]string + Labels map[string]string + Middlewares []Middleware + ProxyOptions *proxy.Options + SigV4 *SigV4Config + TLS *TLSOptions + Timeouts *TimeoutOptions + type Provider struct + Opts ProviderOptions + func NewProvider(opts ...ProviderOptions) *Provider + func (p *Provider) GetTLSConfig(opts ...Options) (*tls.Config, error) + func (p *Provider) GetTransport(opts ...Options) (http.RoundTripper, error) + func (p *Provider) New(opts ...Options) (*http.Client, error) + type ProviderOptions struct + ConfigureClient ConfigureClientFunc + ConfigureMiddleware ConfigureMiddlewareFunc + ConfigureTLSConfig ConfigureTLSConfigFunc + ConfigureTransport ConfigureTransportFunc + Middlewares []Middleware + TLS *TLSOptions + Timeout *TimeoutOptions + type RoundTripperFunc func(req *http.Request) (*http.Response, error) + func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error) + type SigV4Config struct + AccessKey string + AssumeRoleARN string + AuthType string + ExternalID string + Profile string + Region string + SecretKey string + Service string + type TLSOptions struct + CACertificate string + ClientCertificate string + ClientKey string + InsecureSkipVerify bool + MaxVersion uint16 + MinVersion uint16 + ServerName string + type TimeoutOptions struct + DialTimeout time.Duration + ExpectContinueTimeout time.Duration + IdleConnTimeout time.Duration + KeepAlive time.Duration + MaxConnsPerHost int + MaxIdleConns int + MaxIdleConnsPerHost int + TLSHandshakeTimeout time.Duration + Timeout time.Duration