httpconfig

package
v1.40.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 14 Imported by: 3 modules, 27 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClientConfig

type HTTPClientConfig struct {
	Timeout config.Duration `toml:"timeout"`
	TransportConfig
	oauth.OAuth2Config
	cookie.CookieAuthConfig
}

HTTPClientConfig is a common HTTP client struct.

func (*HTTPClientConfig) CreateClient

func (h *HTTPClientConfig) CreateClient(ctx context.Context, log telegraf.Logger) (*http.Client, error)

type TransportConfig added in v1.37.0

type TransportConfig struct {
	IdleConnTimeout       config.Duration `toml:"idle_conn_timeout"`
	MaxIdleConns          int             `toml:"max_idle_conn"`
	MaxIdleConnsPerHost   int             `toml:"max_idle_conn_per_host"`
	ResponseHeaderTimeout config.Duration `toml:"response_timeout"`
	LocalAddress          string          `toml:"local_address"`
	proxy.HTTPProxy
	tls.ClientConfig
}

TransportConfig is configuration structure for HTTP transports

func (*TransportConfig) CreateTransport added in v1.37.0

func (h *TransportConfig) CreateTransport() (*http.Transport, error)

Jump to

Keyboard shortcuts

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