net

package
v1.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProxyEnvVar is the environment variable that contains the proxy details
	ProxyEnvVar string = "HTTP_PROXY"
	//Nameserver is the nameserver to use
	Nameserver string = "8.8.4.4:53"
	// DialerTimeout is the default timeout to use for the net dialer
	DialerTimeout time.Duration = time.Millisecond * time.Duration(10000)
)

Variables

This section is empty.

Functions

func NewHttpClient

func NewHttpClient() *http.Client

NewHttpClient returns an initialized HTTP Client that uses an external nameserver to help avoid negative caching and if detected will make use of any proxy found in the environment

func NewResolver

func NewResolver() *net.Resolver

NewResolver returns an initialized Resolver that uses an external nameserver to help avoid negative caching

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL