Documentation ¶
Overview ¶
Package backoff provides a tool for repeatedly calling a function until it returns a nil error. It implements exponential backoff with a defined maximum value, along with some time randomization.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Retry ¶
Retry retries calling a function until the function returns a non-nil error. It increments two prometheus counters to keep track of how many errors it has seen: one for all errors, and just when the max error count has been reached. The counters are indexed by the passed-in label. For best results, make sure that maxBackoff > 2*initialBackoff.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.