rama-net 0.4.0

rama network types and utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Keyed (per-client) rate limiting.
//!
//! [`KeyedRatePolicy`] is the per-key sibling of
//! [`RatePolicy`](rama_core::layer::limit::policy::RatePolicy): instead of
//! one shared token bucket, every key — typically the client IP, see
//! [`ClientIpRateKey`] — gets its own lazily-created bucket, stored in a
//! bounded, idle-evicting cache.

mod key;
#[doc(inline)]
pub use key::{ClientIpRateKey, InputToRateKey, RateKey};

mod keyed;
#[doc(inline)]
pub use keyed::{KeyedRatePolicy, MissingRateKey, RateKeyCapacityReached};