http

package
v0.0.0-...-6593370 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2017 License: Apache-2.0 Imports: 12 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 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