pub struct RateLimitConfig {
pub blobs_per_hour: u32,
pub mb_per_day: f64,
pub trusted_node_ids: HashSet<NodeIdHex>,
}Expand description
Per-source flood protection for inbound gossip indexing.
Limits apply per unknown publisher_node_id on rolling windows.
Trusted nodes (listed in trusted_node_ids) bypass all limits.
Fields§
§blobs_per_hour: u32Maximum number of announcements accepted per publisher per rolling hour.
mb_per_day: f64Maximum total megabytes accepted per publisher per rolling 24 hours.
trusted_node_ids: HashSet<NodeIdHex>Node IDs exempt from all rate limits.
Trait Implementations§
Source§impl Clone for RateLimitConfig
impl Clone for RateLimitConfig
Source§fn clone(&self) -> RateLimitConfig
fn clone(&self) -> RateLimitConfig
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 RateLimitConfig
impl Debug 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
Mutably borrows from an owned value. Read more