retry

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LinodeBusyRetryCondition

func LinodeBusyRetryCondition(r *resty.Response, _ error) bool

LinodeBusyRetryCondition is a ConditionFunc that retries requests which have resulted in "Linode busy." errors.

func RespectRetryAfter

func RespectRetryAfter(client *resty.Client, resp *resty.Response) (time.Duration, error)

RespectRetryAfter configures the resty client to respect Retry-After headers.

func ServiceUnavailableRetryCondition

func ServiceUnavailableRetryCondition(r *resty.Response, _ error) bool

ServiceUnavailableRetryCondition is a ConditionFunc that retries requests have resulted in an HTTP status code 503.

func TooManyRequestsRetryCondition

func TooManyRequestsRetryCondition(r *resty.Response, _ error) bool

TooManyRequestsRetryConditon is a ConditionFunc that retries requests which have resulted in an HTTP status code 429.

Types

type ConditionFunc

type ConditionFunc resty.RetryConditionFunc

ConditionFunc represents a function that evaluates whether a request should be retried, given the response and error.

Jump to

Keyboard shortcuts

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