Configuration for a RetryState.

Values are trusted, not validated: each delay bound must be a positive, finite number of milliseconds, and the operating cadence a non-negative, finite one. The factories (forStreaming, forPolling) are the validated entry points for anything user-configurable; a caller constructing directly is expected to supply known-good values.

Hierarchy

  • RetryStateConfig

Properties

extendedCeilingMs: number

The longest extended-regime delay, in milliseconds; never less than the extended initial delay.

extendedInitialDelayMs: number

The delay before the first retry in the extended regime, in milliseconds.

normalCeilingMs: number

The longest normal-regime delay, in milliseconds.

normalInitialDelayMs: number

The delay before the first retry in the normal regime, in milliseconds.

operatingCadenceMs?: number

The wait between healthy operations, in milliseconds. No wait is ever shorter than this. Zero (the default) for a component that operates continuously.

random?: (() => number)

Type declaration

    • (): number
    • The random source used for jitter.

      Returns number

resetPolicy: ResetPolicy

Decides when the retry state resets.

Generated using TypeDoc