Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultProxyCallback = http.ProxyFromEnvironment
DefaultProxyCallback is the default proxy callback function that reads from environment variables. http.ProxyFromEnvironment is cached on first call, so we can't use it for tests. When writing a test that uses t.Setenv for some proxy env var, call UseTestingProxyCallback.
Functions ¶
func GetCallback ¶
GetCallback returns the proxy callback function
func UpsertEnv ¶
UpsertEnv removes the existing proxy env variables and adds the custom proxy variables
func UseTestingProxyCallback ¶ added in v3.3.0
func UseTestingProxyCallback()
UseTestingProxyCallback sets the DefaultProxyCallback to use httpproxy.FromEnvironment. This is useful for tests that use t.Setenv to set proxy env variables.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.