Skip to main content

Module backoff

Module backoff 

Source
Expand description

Shared exponential backoff calculations.

This module owns only mechanical delay arithmetic. Callers retain the policy for retryability, cancellation, reset conditions, and observability.

Functionsยง

apply_jitter
Applies an explicit percentage to a delay, saturating at Duration::MAX.
cap_delay
Applies a hard upper bound to a delay.
exponential_delay
Calculates an uncapped exponential delay for a zero-based retry index.
randomized_jitter
Applies a sampled percentage using the default thread-local random generator.