pub struct JoinBuffer { /* private fields */ }Expand description
Buffer for join operations - stores events from each source and correlates them
Implementations§
Source§impl JoinBuffer
impl JoinBuffer
Sourcepub fn new(
sources: Vec<String>,
join_keys: FxHashMap<String, String>,
window_duration: Duration,
) -> Self
pub fn new( sources: Vec<String>, join_keys: FxHashMap<String, String>, window_duration: Duration, ) -> Self
Create a new JoinBuffer for correlating events from multiple sources
§Arguments
sources- Names of the source streams to joinjoin_keys- Map of source name to the field used as join key for that sourcewindow_duration- How long to keep events for potential correlation
Sourcepub const fn with_join_type(self, join_type: JoinType) -> Self
pub const fn with_join_type(self, join_type: JoinType) -> Self
Set the join type (Inner, Left, Right, Full)
Sourcepub const fn with_max_events(self, max_events: usize) -> Self
pub const fn with_max_events(self, max_events: usize) -> Self
Set the maximum number of events to keep per source/key combination
Sourcepub fn stats(&self) -> JoinBufferStats
pub fn stats(&self) -> JoinBufferStats
Get statistics about the buffer state (for debugging)
Source§impl JoinBuffer
impl JoinBuffer
Sourcepub fn checkpoint(&self) -> JoinCheckpoint
pub fn checkpoint(&self) -> JoinCheckpoint
Create a checkpoint of the join buffer state.
Sourcepub fn restore(&mut self, cp: &JoinCheckpoint)
pub fn restore(&mut self, cp: &JoinCheckpoint)
Restore join buffer state from a checkpoint.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JoinBuffer
impl RefUnwindSafe for JoinBuffer
impl Send for JoinBuffer
impl Sync for JoinBuffer
impl Unpin for JoinBuffer
impl UnsafeUnpin for JoinBuffer
impl UnwindSafe for JoinBuffer
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