hyperlane-plugin-rate-limit 22.14.1

A 64-way sharded lock-free atomic GCRA and fixed-window rate limiter plugin for the Hyperlane framework with extensible KeyExtractor and RateLimitStore traits and RFC RateLimit headers.
Documentation
//! hyperlane-plugin-rate-limit
//!
//! 64-way sharded lock-free atomic GCRA and fixed-window rate limiter plugin
//! for Hyperlane with extensible [`KeyExtractor`] and [`RateLimitStore`] traits
//! and RFC `RateLimit-*` response headers.

mod r#const;
mod r#enum;
mod r#fn;
mod r#impl;
mod r#static;
mod r#struct;
mod r#trait;
mod r#type;

#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;

pub use {r#const::*, r#enum::*, r#struct::*, r#trait::*, r#type::*};

pub(crate) use {r#fn::*, r#static::*};

use std::{
    array::from_fn,
    fmt::{self, Write},
    hash::Hasher,
    net::{IpAddr, SocketAddr},
    str::from_utf8,
    sync::{
        Arc, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
        atomic::{AtomicU64, AtomicUsize, Ordering},
    },
    time::Instant,
};

use {
    hyperlane::{
        Context, EMPTY_STR, HashMapXxHash3_64, HttpStatus, RETRY_AFTER, Request,
        RequestHeadersValue, Response, ResponseData, ResponseError, ServerHook, Status, Stream,
        X_FORWARDED_FOR, X_REAL_IP, XxHash3_64, hash_map_xx_hash3_64,
    },
    lombok_macros::*,
};