Interface Delayer

Delayer computes pauses between attempts when retrying a failed operation.

interface Delayer {
    nextDelay(attempt: number): number;
}

Methods

Methods

  • Computes pause time for the given attempt.

    If the retried operation succeeds then this method is not called. Otherwise it is called with the increasing retry number starting from one.

    Parameters

    • attempt: number

      An increasing retry number starting from one.

    Returns number