http

package
v0.0.0-...-f620936 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBytesReadCloser

func NewBytesReadCloser(content []byte) io.ReadCloser

func NewMutualTLSClient

func NewMutualTLSClient(identity tls.Certificate, caCertPool *x509.CertPool, serverName string) *http.Client

func NewStringReadCloser

func NewStringReadCloser(content string) io.ReadCloser

func ReadAndClose

func ReadAndClose(body io.ReadCloser) ([]byte, error)

Types

type Client

type Client interface {
	Do(req *http.Request) (resp *http.Response, err error)
}

func NewNetworkSafeRetryClient

func NewNetworkSafeRetryClient(
	delegate Client,
	maxAttempts uint,
	retryDelay time.Duration,
	logger boshlog.Logger,
) Client

func NewRetryClient

func NewRetryClient(
	delegate Client,
	maxAttempts uint,
	retryDelay time.Duration,
	logger boshlog.Logger,
) Client

type RequestRetryable

type RequestRetryable interface {
	Attempt() (bool, error)
	Response() *http.Response
}

func NewRequestRetryable

func NewRequestRetryable(
	request *http.Request,
	delegate Client,
	logger boshlog.Logger,
	isResponseAttemptable func(*http.Response, error) (bool, error),
) RequestRetryable

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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