Function isRateLimitReached

  • Determines whether the client has exceeded the rate limit within the window.

    Parameters

    • prefix: string

      Counter namespace to inspect.

    • limit: number

      Maximum requests allowed within timeLapse.

    • timeLapse: number

      Sliding window in milliseconds.

    Returns Promise<{
        rateLimitReached: boolean | 0;
        requestCount: number;
    }>

    rateLimitReached and the current requestCount in the window.

Generated using TypeDoc