MCPcopy Create free account
hub / github.com/prometheus/common / WithIdleConnTimeout

Function WithIdleConnTimeout

config/http_config.go:553–557  ·  view source on GitHub ↗

WithIdleConnTimeout allows setting the idle connection timeout.

(timeout time.Duration)

Source from the content-addressed store, hash-verified

551
552// WithIdleConnTimeout allows setting the idle connection timeout.
553func WithIdleConnTimeout(timeout time.Duration) HTTPClientOption {
554 return httpClientOptionFunc(func(opts *httpClientOptions) {
555 opts.idleConnTimeout = timeout
556 })
557}
558
559// WithUserAgent allows setting the user agent.
560func WithUserAgent(ua string) HTTPClientOption {

Callers 1

Calls 1

httpClientOptionFuncFuncType · 0.85

Tested by 1