Skip to content

BucketState

Defined in: packages/rest/src/store.ts:5

A rate-limit bucket as stored: units remaining in the window and when it resets (resetAt, ms since the epoch, in the store’s clock).

optional limit?: number

Defined in: packages/rest/src/store.ts:9

The bucket’s limit per window, once a response has told us.


optional probe?: boolean

Defined in: packages/rest/src/store.ts:21

Placeholder for a bucket nobody knows yet: one request (the probe) is on its way to discover the limit, and everyone else waits for it.


optional provisional?: boolean

Defined in: packages/rest/src/store.ts:16

resetAt is an estimate, not a server value: the window was opened by a reservation after the last one elapsed. A server reset replaces it.


remaining: number

Defined in: packages/rest/src/store.ts:6


resetAt: number

Defined in: packages/rest/src/store.ts:7


optional window?: number

Defined in: packages/rest/src/store.ts:11

X-RateLimit-Reset of the window this state describes, in epoch ms.