ThrottlerRequest


interface ThrottlerRequest {
  context: ExecutionContext
  limit: number
  ttl: number
  throttler: ThrottlerOptions
  blockDuration: number
  getTracker: ThrottlerGetTrackerFunction
  generateKey: ThrottlerGenerateKeyFunction
}

Properties

Property Description
context: ExecutionContext

Interface describing details about the current request pipeline.

limit: number

The amount of requests that are allowed within the ttl's time window.

ttl: number

The number of milliseconds that each request will last in storage.

throttler: ThrottlerOptions

Incoming options of the throttler.

blockDuration: number

The number of milliseconds the request will be blocked.

getTracker: ThrottlerGetTrackerFunction

A method to override the default tracker string.

generateKey: ThrottlerGenerateKeyFunction

A method to override the default key generator.