Documentation
¶
Index ¶
Constants ¶
View Source
const MaxJitter = 1.0
MaxJitter will randomize over the full exponential backoff time
View Source
const NoJitter = 0.0
NoJitter disables the use of jitter for randomizing the exponential backoff time
Variables ¶
This section is empty.
Functions ¶
func NewTimer ¶
NewTimer creates a timer with exponentially increasing delays until the maximum retry attempts are reached. - this function is a simpler version with all default values.
func NewTimerWithJitter ¶
func NewTimerWithJitter(ctx context.Context, unit time.Duration, cap time.Duration, jitter float64) <-chan int
NewTimerWithJitter creates a timer with exponentially increasing delays until the maximum retry attempts are reached. - this function is a fully configurable version, meant for only advanced use cases. For the most part one should use newRetryTimerSimple and newRetryTimer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.