Module failsafe::backoff

source ·
Expand description

Contains various backoff strategies.

Strategies are defined as Iterator<Item=Duration>.

Structs§

  • Creates infinite stream of backoffs that keep the exponential growth, and jitter between 0 and that amount.
  • An infinite stream of backoffs that keep the exponential growth from start until it reaches max.
  • An infinite stream of backoffs that keep half of the exponential growth, and jitter between 0 and that amount.
  • Thread local random generator, invokes rand::thread_rng.
  • A reference to the thread-local generator

Traits§

Functions§

  • Creates a infinite stream of given duration
  • Creates infinite stream of backoffs that keep half of the exponential growth, and jitter between 0 and that amount.
  • Creates infinite stream of backoffs that keep the exponential growth from start until it reaches max.
  • Creates infinite stream of backoffs that keep the exponential growth, and jitter between 0 and that amount.

Type Aliases§

  • A type alias for backoff strategy.
  • A type alias for constant backoff strategy, which is just iterator.