Documentation
¶
Index ¶
- func DefaultBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration
- func DefaultRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)
- func ErrorPropagatedRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)
- func NewClient() *retryablehttp.Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultBackoff ¶
func DefaultRetryPolicy ¶
DefaultRetryPolicy provides a default callback for Client.CheckRetry, which will retry on connection errors and server errors.
func ErrorPropagatedRetryPolicy ¶
ErrorPropagatedRetryPolicy is the same as DefaultRetryPolicy, except it propagates errors back instead of returning nil. This allows you to inspect why it decided to retry or not.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.