Optional Readonlybackoff'linear' keeps the delay constant; 'exponential' doubles it each time.
Optional ReadonlydelayInitial delay between attempts in milliseconds.
Optional ReadonlyjitterJitter applied to the capped delay. Worth keeping for anything that several clients might retry at once.
Optional ReadonlymaxMaximum attempts, including the first.
Optional ReadonlymaxUpper bound on the computed delay, applied after backoff and before jitter.
Stops runaway waits when maxAttempts is large.
Optional ReadonlyonCalled before each retry, with the delay that will actually be waited. If it throws, the retry loop stops and propagates that exception.
Optional ReadonlyretryDecides whether an error is worth retrying. If it throws, the loop stops and propagates that exception.
Optional ReadonlysignalAborts the loop: skips further attempts, interrupts an in-progress wait, and
is forwarded to fn as RetryContext.signal.
Optional ReadonlytimeoutPer-attempt timeout. A timed-out attempt throws TimeoutError (from ./timing), which
is then treated like any other failure.
Options for retry.