Module ratelimiter

Source
Expand description

A rate limiter implementation heavily inspired by governor.

The governor does not support different quota for different key. It is an open issue.

Modules§

clock
Time sources for rate limiters.
quota

Structs§

InMemoryState
An in-memory representation of a GCRA’s rate-limiting state.
RateLimiter
A rate limiter that enforces different quotas per key using the GCRA algorithm.

Traits§

StateStore
A way for rate limiters to keep state.

Type Aliases§

DashMapStateStore
A concurrent, thread-safe and fairly performant hashmap based on [DashMap].