retryablehttp

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultBackoff

func DefaultBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration

func DefaultRetryPolicy

func DefaultRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)

DefaultRetryPolicy provides a default callback for Client.CheckRetry, which will retry on connection errors and server errors.

func ErrorPropagatedRetryPolicy

func ErrorPropagatedRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)

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.

func NewClient

func NewClient() *retryablehttp.Client

Types

This section is empty.

Jump to

Keyboard shortcuts

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