Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Fast = New( WithSlotDuration(fastSlot), WithCeiling(6), ) Slow = New( WithSlotDuration(slowSlot), WithCeiling(6), ) )
Functions ¶
func WithCeiling ¶
func WithCeiling(ceiling uint) option
func WithJitterLimit ¶
func WithJitterLimit(jitterLimit float64) option
func WithSlotDuration ¶
Types ¶
type Backoff ¶
type Backoff interface { // Wait maps index of the retry to a channel which fulfillment means that // Delay is over. // // Note that retry index begins from 0 and 0-th index means that it is the // first retry attempt after an initial error. Wait(n int) <-chan time.Time // Delay returns mapping of i to Delay. Delay(i int) time.Duration }
Backoff is the interface that contains logic of delaying operation retry.
Click to show internal directories.
Click to hide internal directories.