Defined in: packages/rate-limit/src/keyed-table.ts:58
The options a keyed table needs to bound itself and to build one meter per key.
Properties
Section titled “Properties”maxKeyCount
Section titled “maxKeyCount”
readonlymaxKeyCount:number
Defined in: packages/rate-limit/src/keyed-table.ts:63
The most keys the table holds meters for. A positive safe integer. It bounds the table’s memory; it is not a limit on traffic.
readonlymeter:RateMeterFactory
Defined in: packages/rate-limit/src/keyed-table.ts:69
Build one meter for one key. The table calls it with its own clamped reading, so every meter it holds shares one highest reading, and with a built-in factory the meter clamps it again to no effect.
readonlyclock:Clock
Defined in: packages/rate-limit/src/keyed-table.ts:71
The time source every meter reads through. The table clamps it once, for all of them.
whenFull
Section titled “whenFull”
readonlywhenFull:"refuse"|"allow-untracked"
Defined in: packages/rate-limit/src/keyed-table.ts:77
What a request from a key the table cannot hold gets: refuse, or
allow-untracked. Required, because neither answer is safe for every
server.