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

Struct ProxyConfig

config/http_config.go:1680–1695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected