Member Junction
    Preparing search index...

    Limits the rate of an operation to a configured requests/tokens-per-minute, blocking callers in Acquire until capacity is available. Includes exponential backoff that callers can drive via ReportRateLimitError when the downstream service signals throttling.

    Index

    Constructors

    Methods

    • Blocks until the configured request (and optional token) budget permits another call, then records the consumption.

      Parameters

      • tokenCost: number = 0

        Token cost of the upcoming call (0 to skip the token budget).

      Returns Promise<void>