pub struct AggregationWindow { /* private fields */ }Expand description
Aggregation window for collecting events before summarization
Implementations§
Source§impl AggregationWindow
impl AggregationWindow
Sourcepub fn new(
event_class: EventClass,
event_type: &str,
window_duration: Duration,
) -> Self
pub fn new( event_class: EventClass, event_type: &str, window_duration: Duration, ) -> Self
Create a new aggregation window
Sourcepub fn should_flush(&self) -> bool
pub fn should_flush(&self) -> bool
Check if the window should be flushed (time expired)
Sourcepub fn event_count(&self) -> usize
pub fn event_count(&self) -> usize
Get the number of events in this window
Sourcepub fn source_nodes(&self) -> &HashSet<String>
pub fn source_nodes(&self) -> &HashSet<String>
Get source node IDs
Sourcepub fn event_class(&self) -> EventClass
pub fn event_class(&self) -> EventClass
Get the event class
Sourcepub fn event_type(&self) -> &str
pub fn event_type(&self) -> &str
Get the event type
Sourcepub fn window_start(&self) -> Instant
pub fn window_start(&self) -> Instant
Get window start time
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AggregationWindow
impl RefUnwindSafe for AggregationWindow
impl Send for AggregationWindow
impl Sync for AggregationWindow
impl Unpin for AggregationWindow
impl UnsafeUnpin for AggregationWindow
impl UnwindSafe for AggregationWindow
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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