http

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeoutFieldName             = "client.http.timeout"
	MaxIdleConnsFieldName        = "client.http.maximum.idle.connections"
	MaxIdleConnsPerHostFieldName = "client.http.maximum.idle.host"
	MaxConnsPerHostFieldName     = "client.http.maximum.connections"

	TimeoutDefault             = 30 * time.Second
	MaxIdleConnsDefault        = 100
	MaxIdleConnsPerHostDefault = 100
	MaxConnsPerHostDefault     = 100
)

Variables

This section is empty.

Functions

func NewHttp

func NewHttp(config *Config, informer log.Informer, metrics *metrics.Metrics) *http.Client

Types

type Config

type Config struct {
	Timeout             time.Duration
	MaxIdleConns        int
	MaxIdleConnsPerHost int
	MaxConnsPerHost     int
}

func NewConfig

func NewConfig() *Config

type Doer

type Doer interface {
	Do(request *http.Request) (*http.Response, error)
}

func WithConfigurator

func WithConfigurator(configurator configurator.Configurator, config *Config, informer log.Informer, metrics *metrics.Metrics) Doer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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