eventregistry - v11.0.0
    Preparing search index...

    Class Usage

    Token and request accounting for one EventRegistry client. Costs come from the API's response headers, so they are only known after a call finished. The budget guard therefore estimates the next call with the last cost reported for the same path.

    Index
    maxTokens?: number

    Refuse calls that would push the session total above this many tokens. undefined disables the guard.

    • get remainingBudget(): number | undefined

      Tokens left under maxTokens, or undefined when no budget is set.

      Returns number | undefined

    • get session(): { requests: number; tokens: number }

      Totals since construction or the last reset().

      Returns { requests: number; tokens: number }

    • Zero the session totals and forget remembered per-path costs.

      Returns void