Backoff delay calculation with configurable strategies and jitter.
Summary
Functions
Compute the delay for the given attempt based on policy.
Sleep for the computed delay, using the provided sleep function.
Functions
@spec delay(Foundation.Backoff.Policy.t(), non_neg_integer()) :: non_neg_integer()
Compute the delay for the given attempt based on policy.
@spec sleep(Foundation.Backoff.Policy.t(), non_neg_integer(), (non_neg_integer() -> any())) :: :ok
Sleep for the computed delay, using the provided sleep function.