retry

package
v0.0.0-...-082243b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

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

func NewTimer(ctx context.Context) <-chan int

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL