pub struct RateLimiterConfig {
pub handshake_per_ip: RateLimitWindow,
pub connections_per_consumer: RateLimitWindow,
pub connections_per_account: 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_consumer: RateLimitWindowRate limit for connection attempts per resolved consumer (falls back to the token subject for legacy tokens)
connections_per_account: RateLimitWindowRate limit for connection attempts per resolved account (falls back to the metering key for legacy tokens)
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§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