Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateBackOff ¶
type CreateBackOff func() BackOff
CreateBackOff is a function that returns a restful.BackOff
type Restful ¶
Restful takes an http request and an optional response json struct
func WithBackoff ¶
func WithBackoff(r Restful, b CreateBackOff, n Notify) Restful
WithBackoff will use the provided backoff policy
func WithExpectedResult ¶
WithExpectedResult will error if the response status is not the provided one
func WithStatsV2 ¶
WithStatsV2 collects stats in a better way while it does the JSON
type StatsV2 ¶
type StatsV2 interface { OnRequest() OnError(err error) Timing(hadError bool, start time.Time, end time.Time) OnResponse(statusCode int) }
StatsV2 is an interface for reporting statistics, it is more explicit than the v1 interface
type UnexpectedResponseError ¶
UnexpectedResponseError indicates that the request happened correctly but the response was unexpected
func IsUnexpectedResponseError ¶
func IsUnexpectedResponseError(err error) *UnexpectedResponseError
IsUnexpectedResponseError will return the error as a UnexpectedResponseError struct or nil
func (*UnexpectedResponseError) Error ¶
func (u *UnexpectedResponseError) Error() string
Click to show internal directories.
Click to hide internal directories.