http

package
v0.0.2-0...-4ce78c8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NoProxyWarningMap map containing URL's whos proxy behavior will change in the future.
	NoProxyWarningMap = make(map[string]bool)

	// NoProxyWarningMapMutex Lock for NoProxyWarningMap
	NoProxyWarningMapMutex = sync.Mutex{}
)

Functions

func CreateHTTPTransport

func CreateHTTPTransport() *http.Transport

CreateHTTPTransport creates an *http.Transport for use in the agent

Types

type ResetClient

type ResetClient struct {
	// contains filtered or unexported fields
}

ResetClient wraps (http.Client).Do and resets the underlying connections at the configured interval

func NewResetClient

func NewResetClient(resetInterval time.Duration, httpClientFactory func() *http.Client) *ResetClient

NewResetClient returns an initialized Client resetting connections at the passed resetInterval ("0" means that no reset is performed). The underlying http.Client used will be created using the passed http client factory.

func (*ResetClient) Do

func (c *ResetClient) Do(req *http.Request) (*http.Response, error)

Do wraps (http.Client).Do. Thread safe.

Jump to

Keyboard shortcuts

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