Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backoff ¶
type Backoff interface { // Next returns the next amount of backoff to wait before retrying // based on the amount of retries already attempted. Next(retries int) time.Duration }
Backoff allows us to customise the amount of delay (or backoff) between HTTP request retries.
func Constant ¶
Constant returns a backoff strategy which always waits the same amount of time between requests.
func Exponential ¶
Exponential applies an exponential type strategy from the initial interval up to the defined max using the default growth rate.
func ExponentialWithGrowthRate ¶
ExponentialWithGrowthRate applies an exponential type strategy from the initial interval up to the defined max using the supplied growth rate which should be between 0.1 and 1.0 (1% - 100% growth)
Click to show internal directories.
Click to hide internal directories.