httpclient

package
v3.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*httpClientOptions)

Option is an option for HTTP clients.

func WithCache

func WithCache(b bool) Option

WithCache enables caching at transport level.

func WithTLSConfig

func WithTLSConfig(c *tls.Config) Option

WithTLSConfig configures the TLS configuration to be used by the transport.

func WithTLSConfigOptions

func WithTLSConfigOptions(opts ...tlsconfig.Option) Option

WithTLSConfigOptions configures the TLS configuration options provided to the TLS configuration provider by the transport.

type Provider

type Provider interface {
	HTTPClient(context.Context, ...Option) (*http.Client, error)
}

Provider constructs *http.Clients.

func NewProvider

func NewProvider(tlsConfigProvider TLSClientConfigurationProvider) Provider

NewProvider constructs a Provider on top of the provided TLS configuration provider.

type TLSClientConfigurationProvider

type TLSClientConfigurationProvider interface {
	GetTLSClientConfig(context.Context, ...tlsconfig.Option) (*tls.Config, error)
}

TLSClientConfigurationProvider provides a *tls.Config to be used by TLS clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL