http

package
Version: v0.0.0-...-9a89ba0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2014 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 AttemptRetryStrategy

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

func (*AttemptRetryStrategy) NewRetryHandler

func (a *AttemptRetryStrategy) NewRetryHandler() RetryHandler

type Client

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

func NewRetryClient

func NewRetryClient(
	delegate Client,
	retryStrategy RetryStrategy,
	delay time.Duration,
	timeService boshtime.Service,
	logger boshlog.Logger,
) Client

type RetryHandler

type RetryHandler interface {
	IsRetryable(req *http.Request, resp *http.Response, err error) bool
}

func NewAttemptRetryHandler

func NewAttemptRetryHandler(maxAttempts uint) RetryHandler

type RetryStrategy

type RetryStrategy interface {
	NewRetryHandler() RetryHandler
}

func NewAttemptRetryStrategy

func NewAttemptRetryStrategy(maxAttempts uint) RetryStrategy

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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