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

Function NewRoundTripperFromConfig

config/http_config.go:623–625  ·  view source on GitHub ↗

NewRoundTripperFromConfig returns a new HTTP RoundTripper configured for the given config.HTTPClientConfig and config.HTTPClientOption. The name is used as go-conntrack metric label.

(cfg HTTPClientConfig, name string, optFuncs ...HTTPClientOption)

Source from the content-addressed store, hash-verified

621// given config.HTTPClientConfig and config.HTTPClientOption.
622// The name is used as go-conntrack metric label.
623func NewRoundTripperFromConfig(cfg HTTPClientConfig, name string, optFuncs ...HTTPClientOption) (http.RoundTripper, error) {
624 return NewRoundTripperFromConfigWithContext(context.Background(), cfg, name, optFuncs...)
625}
626
627// NewRoundTripperFromConfigWithContext returns a new HTTP RoundTripper configured for the
628// given config.HTTPClientConfig and config.HTTPClientOption.

Callers 6

TestOAuth2UserAgentFunction · 0.85
TestHostFunction · 0.85
NewClientFromConfigFunction · 0.85

Tested by 5

TestOAuth2UserAgentFunction · 0.68
TestHostFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…