Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
NewClient returns a new http.Client which implements hedged requests pattern. Given Client starts a new request after a timeout from previous request. Starts no more than upto requests.
func NewRoundTripper ¶
func NewRoundTripper(timeout time.Duration, upto int, rt http.RoundTripper) http.RoundTripper
NewRoundTripper returns a new http.RoundTripper which implements hedged requests pattern. Given RoundTripper starts a new request after a timeout from previous request. Starts no more than upto requests.
Types ¶
type ErrorFormatFunc ¶ added in v0.2.0
ErrorFormatFunc is called by MultiError to return the list of errors as a string.
type MultiError ¶ added in v0.2.0
type MultiError struct {
Errors []error
ErrorFormatFn ErrorFormatFunc
}
MultiError is an error type to track multiple errors. This is used to accumulate errors in cases and return them as a single "error". Insiper by https://github.com/hashicorp/go-multierror
func (*MultiError) Error ¶ added in v0.2.0
func (e *MultiError) Error() string
func (*MultiError) ErrorOrNil ¶ added in v0.2.0
func (e *MultiError) ErrorOrNil() error
ErrorOrNil returns an error if there are some.
func (*MultiError) String ¶ added in v0.2.0
func (e *MultiError) String() string