Documentation
¶
Overview ¶
Package ratelimit rate-caps admissions per key, the shape the node's doors share: one admission per interval for each key, in bounded memory. A shared library: no loops of its own, no policy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keyed ¶
type Keyed[K comparable] struct { // contains filtered or unexported fields }
Keyed rate-caps admissions per key: one admission per interval, and a key silent for an interval is admitted again and stops being tracked. It tracks at most keyCap keys and sweeps the silent ones at most once per interval, so a flood of fresh keys costs bounded memory and amortized time; a fresh key arriving while the table is full is refused.