http

package
v0.0.0-...-3d8c8f1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2016 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 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,
) RequestRetryable

type Seekable

type Seekable interface {
	Seek(offset int64, whence int) (ret int64, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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