pub struct RateLimitConfig {
pub enable_rate_limiting: bool,
pub rate_limit: u32,
pub rate_limit_window: u64,
pub enable_rate_limit_auto_ban: bool,
}Expand description
The rate-limiting knobs (the reference enable_rate_limiting /
rate_limit / rate_limit_window / enable_rate_limit_auto_ban group).
The engine defaults are the opt-in pair: rate limiting off (false,
zero behavior change unless enabled - the adapters only install the stage
when the config asks for it) with the reference thresholds for when it is
turned on. Note the Python SecurityConfig defaults enable_rate_limiting
to true; the Rust family pins the conservative false so an adapter
upgrade never starts shedding traffic uninvited.
Fields§
§enable_rate_limiting: boolenable_rate_limiting. false makes every RateLimiter::check
an unconditional allow that records nothing.
rate_limit: u32rate_limit: maximum requests per client IP inside
rate_limit_window seconds.
rate_limit_window: u64rate_limit_window: the window length in seconds.
enable_rate_limit_auto_ban: boolenable_rate_limit_auto_ban: feed rate-limit crossings into the
auto-ban engine (the rate_limit category of the violation counters)
when the pipeline stage runs with IP banning enabled.
Trait Implementations§
Source§impl Clone for RateLimitConfig
impl Clone for RateLimitConfig
Source§impl Debug for RateLimitConfig
impl Debug for RateLimitConfig
Source§impl Default for RateLimitConfig
impl Default for RateLimitConfig
impl Eq for RateLimitConfig
Source§impl PartialEq for RateLimitConfig
impl PartialEq for RateLimitConfig
impl StructuralPartialEq for RateLimitConfig
Auto Trait Implementations§
impl Freeze for RateLimitConfig
impl RefUnwindSafe for RateLimitConfig
impl Send for RateLimitConfig
impl Sync for RateLimitConfig
impl Unpin for RateLimitConfig
impl UnsafeUnpin for RateLimitConfig
impl UnwindSafe for RateLimitConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.