Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultBaseSleep = 100 * time.Millisecond DefaultCapSleep = 30 * time.Second DefaultFactor = 2.0 )
Defaults for the retries.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*retrier)
An Option changes the default behavior of a retrier.
func UseBaseSleep ¶
UseBaseSleep makes the retrier sleep at least `base`.
func UseCapSleep ¶
UseCapSleep makes the retrier sleep at most `cap`.
func UseFactor ¶
UseFactor makes the retrier grow its exponential backoff using factor as the base of the exponent.
Click to show internal directories.
Click to hide internal directories.