Skip to main content

hyperlane_plugin_rate_limit/
enum.rs

1/// Rate-limiting algorithm used by [`crate::ShardedRateLimiter`].
2#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
3pub enum RateLimitAlgorithm {
4    /// Generic Cell Rate Algorithm (smooth leaky-bucket with exact burst allowance, lock-free CAS).
5    #[default]
6    Gcra,
7    /// Lock-free atomic fixed-window counter.
8    FixedWindow,
9}