Skip to content

RateLimiter

RateLimiter: object

Defined in: Core/RateLimiter.ts:24

make: (config) => RateLimiter = makeRateLimiter

Creates a rate limiter with the provided quota and queueing policy.

Config

RateLimiter

RateLimiter for the sliding window and the two overflow strategies.

const github = RateLimiter.make({
  limit: 60,
  window: Duration.minutes(1),
  strategy: "wait",
  maxWait: Duration.seconds(15),
});