pub struct RateLimiterConfig {
pub handshake_per_ip: RateLimitWindow,
pub connections_per_subject: RateLimitWindow,
pub connections_per_metering_key: RateLimitWindow,
pub subscriptions_per_connection: RateLimitWindow,
pub messages_per_connection: RateLimitWindow,
pub snapshots_per_connection: RateLimitWindow,
pub enabled: bool,
}Expand description
Rate limiter configuration per key type
Fields§
§handshake_per_ip: RateLimitWindowRate limit for handshake attempts per IP
connections_per_subject: RateLimitWindowRate limit for connection attempts per subject
connections_per_metering_key: RateLimitWindowRate limit for connection attempts per metering key
subscriptions_per_connection: RateLimitWindowRate limit for subscription requests per connection
messages_per_connection: RateLimitWindowRate limit for messages per connection
snapshots_per_connection: RateLimitWindowRate limit for snapshot requests per connection
enabled: boolEnable rate limiting (can be disabled for testing)
Implementations§
Trait Implementations§
Source§impl Clone for RateLimiterConfig
impl Clone for RateLimiterConfig
Source§fn clone(&self) -> RateLimiterConfig
fn clone(&self) -> RateLimiterConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RateLimiterConfig
impl Debug for RateLimiterConfig
Auto Trait Implementations§
impl Freeze for RateLimiterConfig
impl RefUnwindSafe for RateLimiterConfig
impl Send for RateLimiterConfig
impl Sync for RateLimiterConfig
impl Unpin for RateLimiterConfig
impl UnsafeUnpin for RateLimiterConfig
impl UnwindSafe for RateLimiterConfig
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
Mutably borrows from an owned value. Read more