Skip to content

@lelantos-org/sdk / core / RetryPolicy

Interface: RetryPolicy โ€‹

Defined in: @lelantos-org/sdk/dist/core/async.d.ts:14

Properties โ€‹

backoffMs โ€‹

ts
backoffMs: number;

Defined in: @lelantos-org/sdk/dist/core/async.d.ts:18

Base backoff, doubled per attempt.


jitter? โ€‹

ts
optional jitter?: number;

Defined in: @lelantos-org/sdk/dist/core/async.d.ts:20

Fraction of the delay to randomise, in [0, 1]. Default 0.25.


onRetry? โ€‹

ts
optional onRetry?: (info) => void;

Defined in: @lelantos-org/sdk/dist/core/async.d.ts:24

Observability hook; must not throw.

Parameters โ€‹

ParameterType
info{ attempt: number; delayMs: number; err: unknown; }
info.attemptnumber
info.delayMsnumber
info.errunknown

Returns โ€‹

void


retries โ€‹

ts
retries: number;

Defined in: @lelantos-org/sdk/dist/core/async.d.ts:16

Additional attempts after the first. 0 disables retrying.


shouldRetry? โ€‹

ts
optional shouldRetry?: (err, attempt) => boolean;

Defined in: @lelantos-org/sdk/dist/core/async.d.ts:22

Return false to stop retrying and rethrow immediately.

Parameters โ€‹

ParameterType
errunknown
attemptnumber

Returns โ€‹

boolean


signal? โ€‹

ts
optional signal?: AbortSignal;

Defined in: @lelantos-org/sdk/dist/core/async.d.ts:29

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub