pub struct BackboneFastFlapMonitor { /* private fields */ }Expand description
Process-wide fast-flap history. Policy remains per listener, while the IP
history is shared like upstream’s class-level fast_flapping table.
Implementations§
Source§impl BackboneFastFlapMonitor
impl BackboneFastFlapMonitor
pub fn new() -> Self
pub fn record_disconnect( &mut self, peer_ip: IpAddr, connected_for: Duration, config: &BackboneFastFlapConfig, now: Instant, ) -> Option<FastFlapRecord>
pub fn is_blocked( &mut self, peer_ip: IpAddr, config: &BackboneFastFlapConfig, now: Instant, ) -> bool
pub fn blocked_until( &mut self, peer_ip: IpAddr, config: &BackboneFastFlapConfig, now: Instant, ) -> Option<Instant>
pub fn blocked_ip_count( &mut self, config: &BackboneFastFlapConfig, now: Instant, ) -> usize
pub fn blocked_ip_list( &mut self, config: &BackboneFastFlapConfig, now: Instant, ) -> Vec<IpAddr>
pub fn flap_count(&self, peer_ip: IpAddr) -> u64
pub fn clear(&mut self, peer_ip: IpAddr) -> bool
Trait Implementations§
Source§impl Debug for BackboneFastFlapMonitor
impl Debug for BackboneFastFlapMonitor
Auto Trait Implementations§
impl Freeze for BackboneFastFlapMonitor
impl RefUnwindSafe for BackboneFastFlapMonitor
impl Send for BackboneFastFlapMonitor
impl Sync for BackboneFastFlapMonitor
impl Unpin for BackboneFastFlapMonitor
impl UnsafeUnpin for BackboneFastFlapMonitor
impl UnwindSafe for BackboneFastFlapMonitor
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
Source§impl<T> InterfaceConfigData for Twhere
T: Send + 'static,
impl<T> InterfaceConfigData for Twhere
T: Send + 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more