Crate actix_rate_limiter
source ·Expand description
actix-rate-limiter
is a simple yet powerful per-route rate limiter for
Actix with support for regex.
§Available backends
Right now, only in-memory storage is supported officially. But you can
create your own backend using the BackendProvider
trait. You can use
MemoryBackendProvider
as an example implementation.
We plan to add support for some other backends in the future, such as Redis. If you want to help with their development, please checkout our GitHub.
§Examples
Check the examples folder of our repository to see the available code samples.
Modules§
- This module represents backends for rate-limiter with some general public tools for your own implementation.
- Representation and implementation of the bucket and its limitx.
- Representation and implementation of a rate-limiter core logic.
- Implementation of the rate-limiting middleware.
- Route builder and route representation itself.
Type Aliases§
- General type for tne ID of the request. It consists of the requester’s identifier and the request’s path. Guaranteed format:
{id}:{path}
.