attempt (1-based) failed attempts.
Capped exponential with symmetric jitter; a function policy is called as-is.
Never negative; non-finite results become 0.
Parameters
Returns
numberDocumentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Function exported by @botmesh/core/spi.
function computeBackoff(
policy,
attempt,
random?
): number;
attempt (1-based) failed attempts.
Capped exponential with symmetric jitter; a function policy is called as-is.
Never negative; non-finite results become 0.
| Parameter | Type | Default value |
|---|---|---|
policy | RetryBackoff | undefined | undefined |
attempt | number | undefined |
random? | () => number | Math.random |
number