firefly-limiter - v1.0.1
    Preparing search index...

    Interface DependencyOptions

    Configuration for a Dependency.

    interface DependencyOptions {
        attempts: number;
        backoff: Backoff;
        breaker:
            | false
            | Omit<ConsecutiveBreakerOptions, "onEvent" | "clock">
            | Omit<WindowedBreakerOptions, "onEvent" | "clock">;
        budget?: RetryBudgetOptions;
        bulkhead?: Omit<BulkheadOptions, "onEvent" | "clock">;
        clock?: Clock;
        deadline: number;
        hedge?: Omit<HedgeOptions, "onEvent" | "clock" | "budget">;
        maxElapsed?: number;
        name: string;
        onEvent?: EventSink;
        rateLimit?: Omit<RateLimiterOptions, "onEvent" | "clock">;
        shouldRetry: RetryPredicate;
    }
    Index
    attempts: number

    Total attempts per call, not additional ones: 1 never retries.

    backoff: Backoff

    How long to wait between attempts.

    breaker:
        | false
        | Omit<ConsecutiveBreakerOptions, "onEvent" | "clock">
        | Omit<WindowedBreakerOptions, "onEvent" | "clock">

    When to stop calling this dependency altogether, or false to say you decided against a breaker rather than to have forgotten one.

    A ceiling on the extra calls this dependency is allowed to make, shared by its retries and its hedged attempts.

    bulkhead?: Omit<BulkheadOptions, "onEvent" | "clock">

    How many attempts may be in flight, and how many may wait.

    clock?: Clock

    Defaults to the system clock.

    deadline: number

    Deadline for one attempt, in milliseconds.

    hedge?: Omit<HedgeOptions, "onEvent" | "clock" | "budget">

    Send the work again when it is slow rather than when it has failed.

    maxElapsed?: number

    Budget for a whole call, across all its attempts.

    name: string

    What this dependency is called, in health output and in your own logs.

    onEvent?: EventSink

    Receives every decision made about this dependency.

    rateLimit?: Omit<RateLimiterOptions, "onEvent" | "clock">

    How fast attempts may start.

    shouldRetry: RetryPredicate

    Whether a failure is worth repeating. There is no default; see retry.