Versions in this module Expand all Collapse all v0 v0.3.2 Nov 9, 2018 Changes in this version + const UserAgent + const Version + func Cause(err error) error + func ForceLog(level LogLevel, msg string) + func NewError(cause error, msg string) error + func NewRequestBodyProgress(requestBody io.ReadSeeker, pr ProgressReceiver) io.ReadSeeker + func NewResponseBodyProgress(responseBody io.ReadCloser, pr ProgressReceiver) io.ReadCloser + func WriteRequestWithResponse(b *bytes.Buffer, request *http.Request, response *http.Response, err error) + type ErrorNode struct + func (ErrorNode) Initialize(cause error, callersToSkip int) ErrorNode + func (e *ErrorNode) Cause() error + func (e *ErrorNode) Error(msg string) string + func (e ErrorNode) Temporary() bool + func (e ErrorNode) Timeout() bool + type Factory interface + New func(next Policy, po *PolicyOptions) Policy + func MethodFactoryMarker() Factory + type FactoryFunc func(next Policy, po *PolicyOptions) PolicyFunc + func (f FactoryFunc) New(next Policy, po *PolicyOptions) Policy + type LogLevel uint32 + const LogDebug + const LogError + const LogFatal + const LogInfo + const LogNone + const LogPanic + const LogWarning + type LogOptions struct + Log func(level LogLevel, message string) + ShouldLog func(level LogLevel) bool + type Options struct + HTTPSender Factory + Log LogOptions + type Pipeline interface + Do func(ctx context.Context, methodFactory Factory, request Request) (Response, error) + func NewPipeline(factories []Factory, o Options) Pipeline + type Policy interface + Do func(ctx context.Context, request Request) (Response, error) + type PolicyFunc func(ctx context.Context, request Request) (Response, error) + func (f PolicyFunc) Do(ctx context.Context, request Request) (Response, error) + type PolicyOptions struct + func (po *PolicyOptions) Log(level LogLevel, msg string) + func (po *PolicyOptions) ShouldLog(level LogLevel) bool + type ProgressReceiver func(bytesTransferred int64) + type Request struct + func NewRequest(method string, url url.URL, body io.ReadSeeker) (request Request, err error) + func (r Request) Copy() Request + func (r Request) RewindBody() error + func (r Request) SetBody(body io.ReadSeeker) error + type Response interface + Response func() *http.Response + func NewHTTPResponse(response *http.Response) Response