exthttp

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHedgedTransportWithConfig added in v0.37.0

func CreateHedgedTransportWithConfig(config CustomBucketConfig) func(rt http.RoundTripper) http.RoundTripper

func DefaultTransport added in v0.28.0

func DefaultTransport(config HTTPConfig) (*http.Transport, error)

DefaultTransport - this default transport is based on the Minio DefaultTransport up until the following commit: https://github.com/minio/minio-go/commit/008c7aa71fc17e11bf980c209a4f8c4d687fc884 The values have since diverged.

func NewTLSConfig added in v0.28.0

func NewTLSConfig(cfg *TLSConfig) (*tls.Config, error)

NewTLSConfig creates a new tls.Config from the given TLSConfig.

Types

type CustomBucketConfig added in v0.37.0

type CustomBucketConfig struct {
	HedgingConfig HedgingConfig `yaml:"hedging_config"`
}

func DefaultCustomBucketConfig added in v0.37.0

func DefaultCustomBucketConfig() CustomBucketConfig

type HTTPConfig added in v0.28.0

type HTTPConfig struct {
	IdleConnTimeout       model.Duration `yaml:"idle_conn_timeout"`
	ResponseHeaderTimeout model.Duration `yaml:"response_header_timeout"`
	InsecureSkipVerify    bool           `yaml:"insecure_skip_verify"`

	TLSHandshakeTimeout   model.Duration `yaml:"tls_handshake_timeout"`
	ExpectContinueTimeout model.Duration `yaml:"expect_continue_timeout"`
	MaxIdleConns          int            `yaml:"max_idle_conns"`
	MaxIdleConnsPerHost   int            `yaml:"max_idle_conns_per_host"`
	MaxConnsPerHost       int            `yaml:"max_conns_per_host"`

	// Transport field allows upstream callers to inject a custom round tripper.
	Transport http.RoundTripper `yaml:"-"`

	TLSConfig          TLSConfig `yaml:"tls_config"`
	DisableCompression bool      `yaml:"disable_compression"`
}

TODO(bwplotka): HTTPConfig stores the http.Transport configuration for the cos and s3 minio client.

type HedgingConfig added in v0.37.0

type HedgingConfig struct {
	Enabled  bool    `yaml:"enabled"`
	UpTo     uint    `yaml:"up_to"`
	Quantile float64 `yaml:"quantile"`
}

type TLSConfig added in v0.28.0

type TLSConfig struct {
	// The CA cert to use for the targets.
	CAFile string `yaml:"ca_file"`
	// The client cert file for the targets.
	CertFile string `yaml:"cert_file"`
	// The client key file for the targets.
	KeyFile string `yaml:"key_file"`
	// Used to verify the hostname for the targets.
	ServerName string `yaml:"server_name"`
	// Disable target certificate validation.
	InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
}

TLSConfig configures the options for TLS connections.

Jump to

Keyboard shortcuts

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