Expand description
Keyed rate limiters (those that can hold one state per key).
These are rate limiters that have one set of parameters (burst capacity per time period) but apply those to several sets of actual rate-limiting states, e.g. to enforce one API call rate limit per API key.
Rate limiters based on these types are constructed with
the RateLimiter constructors
Traits§
- Keyed
State Store - A trait for state stores with one rate limiting state per key.
- Shrinkable
Keyed State Store - Keyed rate limiters that can be “cleaned up”.
Type Aliases§
- Dash
MapState Store - A concurrent, thread-safe and fairly performant hashmap based on
DashMap. - Default
Keyed State Store - The default keyed rate limiter type: the concurrent
DashMap. - Hash
MapState Store - A thread-safe (but not very performant) implementation of a keyed rate limiter state
store using
HashMap.