Skip to content

ExponentialBackoff

Defined in: src/retry/backoff-strategy.ts:132

Exponential backoff: delay grows as baseMs * multiplier^(attempt-1), capped at maxMs, then jittered.

new ExponentialBackoff(opts?): ExponentialBackoff;

Defined in: src/retry/backoff-strategy.ts:138

ParameterType
optsExponentialBackoffOptions

ExponentialBackoff

nextDelay(ctx): number;

Defined in: src/retry/backoff-strategy.ts:145

Returns the delay in milliseconds before the next attempt.

Must be a non-negative finite number. Implementations should treat ctx.attempt < 1 as a programmer error.

ParameterType
ctxBackoffContext

number

BackoffStrategy.nextDelay