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

    Type Alias FireflyEvent

    FireflyEvent: (
        | { attempt: number; type: "attempt" }
        | RetryEvent
        | { elapsed: number; ms: number; type: "timeout" }
        | { attempt: number; type: "hedge" }
        | { tokens: number; type: "budget-exhausted" }
        | { error: unknown; type: "fallback" }
        | BodyTooLargeEvent
        | CircuitOpenEvent
        | { openedAt: number; type: "circuit-half-open" }
        | { type: "circuit-close" }
        | RateLimitedEvent
        | BulkheadEvent
    ) & { call: string }

    Something a policy decided, handed to an EventSink as a plain value.

    The union is closed and every member carries the numbers behind the decision, so a sink can count, log or ignore them without asking the policy anything else. Every one of them also carries the call it belongs to.

    Type Declaration

    • Readonlycall: string

      Groups every event from one call, so a sink can tell three attempts of one call from one attempt of three calls.