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

Function WithDialContextFunc

config/http_config.go:523–527  ·  view source on GitHub ↗

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

(fn DialContextFunc)

Source from the content-addressed store, hash-verified

521// WithDialContextFunc allows you to override the func gets used for the dialing.
522// The default is `net.Dialer.DialContext`.
523func WithDialContextFunc(fn DialContextFunc) HTTPClientOption {
524 return httpClientOptionFunc(func(opts *httpClientOptions) {
525 opts.dialContextFunc = fn
526 })
527}
528
529// WithNewTLSConfigFunc allows you to override the func that creates the TLS config
530// from the prometheus http config.

Callers 2

Calls 1

httpClientOptionFuncFuncType · 0.85

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…