Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @aws-sdk/util-waiter

@aws-sdk/util-waiter

NPM version NPM downloads

An internal package

Usage

You probably shouldn't, at least directly.

Index

References

WaiterConfiguration

Re-exports WaiterConfiguration

WaiterOptions

Re-exports WaiterOptions

WaiterResult

Re-exports WaiterResult

WaiterState

Re-exports WaiterState

checkExceptions

Re-exports checkExceptions

createWaiter

Re-exports createWaiter

sleep

Re-exports sleep

validateWaiterOptions

Re-exports validateWaiterOptions

waiterServiceDefaults

Re-exports waiterServiceDefaults

Type aliases

Private WaiterOptions

WaiterOptions<Client>: WaiterConfiguration<Client> & Required<Pick<WaiterConfiguration<Client>, "minDelay" | "maxDelay">>

Type parameters

  • Client

WaiterResult

WaiterResult: { reason?: any; state: WaiterState }

Type declaration

  • Optional reason?: any

    (optional) Indicates a reason for why a waiter has reached its state.

  • state: WaiterState

Functions

Const abortTimeout

Const checkExceptions

Const createWaiter

  • Create a waiter promise that only resolves when:

    1. Abort controller is signaled
    2. Max wait time is reached
    3. acceptorChecks succeeds, or fails Otherwise, it invokes acceptorChecks with exponential-backoff delay.
    internal

    Type parameters

    • Client

    • Input

    Parameters

    Returns Promise<WaiterResult>

Const exponentialBackoffWithJitter

  • exponentialBackoffWithJitter(minDelay: number, maxDelay: number, attemptCeiling: number, attempt: number): number

Const randomInRange

  • randomInRange(min: number, max: number): number

Const runPolling

  • runPolling<Client, Input>(__namedParameters: { abortController: AbortController; abortSignal: AbortSignal; client: Client; maxDelay: number; maxWaitTime: number; minDelay: number }, input: Input, acceptorChecks: (client: Client, input: Input) => Promise<WaiterResult>): Promise<WaiterResult>
  • Function that runs polling as part of waiters. This will make one inital attempt and then subsequent attempts with an increasing delay.

    Type parameters

    • Client

    • Input

    Parameters

    • __namedParameters: { abortController: AbortController; abortSignal: AbortSignal; client: Client; maxDelay: number; maxWaitTime: number; minDelay: number }
    • input: Input

      client input

    • acceptorChecks: (client: Client, input: Input) => Promise<WaiterResult>
        • Parameters

          • client: Client
          • input: Input

          Returns Promise<WaiterResult>

    Returns Promise<WaiterResult>

Const sleep

  • sleep(seconds: number): Promise<unknown>

Const validateWaiterOptions

  • validateWaiterOptions<Client>(options: WaiterOptions<Client>): void

Object literals

Private Const waiterServiceDefaults

waiterServiceDefaults: object

maxDelay

maxDelay: number = 120

minDelay

minDelay: number = 2