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

Struct ProxyConfig

config/http_config.go:1676–1691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1674}
1675
1676type ProxyConfig struct {
1677 // HTTP proxy server to use to connect to the targets.
1678 ProxyURL URL `yaml:"proxy_url,omitempty" json:"proxy_url,omitempty"`
1679 // NoProxy contains addresses that should not use a proxy.
1680 NoProxy string `yaml:"no_proxy,omitempty" json:"no_proxy,omitempty"`
1681 // ProxyFromEnvironment makes use of net/http ProxyFromEnvironment function
1682 // to determine proxies.
1683 ProxyFromEnvironment bool `yaml:"proxy_from_environment,omitempty" json:"proxy_from_environment,omitempty"`
1684 // ProxyConnectHeader optionally specifies headers to send to
1685 // proxies during CONNECT requests. Assume that at least _some_ of
1686 // these headers are going to contain secrets and use Secret as the
1687 // value type instead of string.
1688 ProxyConnectHeader ProxyHeader `yaml:"proxy_connect_header,omitempty" json:"proxy_connect_header,omitempty"`
1689
1690 proxyFunc func(*http.Request) (*url.URL, error)
1691}
1692
1693// UnmarshalYAML implements the yaml.Unmarshaler interface.
1694func (c *ProxyConfig) Validate() error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected