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

Struct ProxyConfig

config/http_config.go:1196–1211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1194}
1195
1196type ProxyConfig struct {
1197 // HTTP proxy server to use to connect to the targets.
1198 ProxyURL URL `yaml:"proxy_url,omitempty" json:"proxy_url,omitempty"`
1199 // NoProxy contains addresses that should not use a proxy.
1200 NoProxy string `yaml:"no_proxy,omitempty" json:"no_proxy,omitempty"`
1201 // ProxyFromEnvironment makes use of net/http ProxyFromEnvironment function
1202 // to determine proxies.
1203 ProxyFromEnvironment bool `yaml:"proxy_from_environment,omitempty" json:"proxy_from_environment,omitempty"`
1204 // ProxyConnectHeader optionally specifies headers to send to
1205 // proxies during CONNECT requests. Assume that at least _some_ of
1206 // these headers are going to contain secrets and use Secret as the
1207 // value type instead of string.
1208 ProxyConnectHeader Header `yaml:"proxy_connect_header,omitempty" json:"proxy_connect_header,omitempty"`
1209
1210 proxyFunc func(*http.Request) (*url.URL, error)
1211}
1212
1213// UnmarshalYAML implements the yaml.Unmarshaler interface.
1214func (c *ProxyConfig) Validate() error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected