Anchorage API reference
    Preparing search index...

    Fixed-window rate-limit counters keyed by connector id. Implementations back the manifest's rateLimit budget. The store's reach IS the budget's reach: InMemoryRateLimitStore caps per isolate (per RUN under DO-per-run routing); a declared cap that must hold across isolates needs D1RateLimitStore (or an equivalent shared store).

    interface RateLimitStore {
        increment(
            key: string,
            windowMs: number,
            now: number,
        ): number | Promise<number>;
    }

    Implemented by

    Index

    Methods

    Methods

    • Atomically count one call against the connector's current fixed window and return the post-increment count. now is caller-supplied epoch ms so stores stay clock-free.

      Parameters

      • key: string
      • windowMs: number
      • now: number

      Returns number | Promise<number>