Documentation
¶
Overview ¶
Package backoff computes jittered retry delays, fixed step schedules and poll intervals for the event-sourcing, scheduler and inbox runtimes.
Jitter only ever shortens a delay, so a configured delay is always an upper bound.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Retry ¶
type Retry struct {
// MaxAttempts is the total number of attempts, including the first.
MaxAttempts int
// Base is the delay after the first failed attempt.
Base time.Duration
// Max caps every delay.
Max time.Duration
}
Retry describes jittered exponential retry delays.
type Source ¶
Source draws jitter. *rand.Rand from math/rand/v2 satisfies it; a nil Source uses the global math/rand/v2 generator.
Click to show internal directories.
Click to hide internal directories.