Skip to content

RateLimitStore

Defined in: src/policies/traffic/rate-limit.ts:30

Pluggable storage backend for rate limit counters

optional destroy(): void

Defined in: src/policies/traffic/rate-limit.ts:34

Optional: cleanup resources (like intervals) used by the store

void


increment(key, windowSeconds): Promise<{ count: number; resetAt: number; }>

Defined in: src/policies/traffic/rate-limit.ts:32

Increment the counter for a key, returning the new count and TTL

string

number

Promise<{ count: number; resetAt: number; }>