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

Function WithDialContextFunc

config/http_config.go:439–443  ·  view source on GitHub ↗

WithDialContextFunc allows you to override func gets used for the actual dialing. The default is `net.Dialer.DialContext`.

(fn DialContextFunc)

Source from the content-addressed store, hash-verified

437
438// WithDialContextFunc allows you to override func gets used for the actual dialing. The default is `net.Dialer.DialContext`.
439func WithDialContextFunc(fn DialContextFunc) HTTPClientOption {
440 return func(opts *httpClientOptions) {
441 opts.dialContextFunc = fn
442 }
443}
444
445// WithKeepAlivesDisabled allows to disable HTTP keepalive.
446func WithKeepAlivesDisabled() HTTPClientOption {

Callers 1

Calls

no outgoing calls

Tested by 1