pub struct LogAggregator { /* private fields */ }Expand description
Aggregates log entries from local and remote mesh nodes.
Stores entries per node and provides a merged, time-ordered query interface.
Implementations§
Source§impl LogAggregator
impl LogAggregator
Sourcepub fn new(local_node_id: String) -> Self
pub fn new(local_node_id: String) -> Self
Create a new log aggregator for the given local node.
Sourcepub fn add_remote(&self, entry: RemoteLogEntry)
pub fn add_remote(&self, entry: RemoteLogEntry)
Add a remote log entry received from a mesh peer.
Sourcepub fn add_remote_batch(&self, entries: Vec<RemoteLogEntry>)
pub fn add_remote_batch(&self, entries: Vec<RemoteLogEntry>)
Add a batch of remote log entries.
Sourcepub fn query(&self, query: &LogQuery) -> Vec<RemoteLogEntry>
pub fn query(&self, query: &LogQuery) -> Vec<RemoteLogEntry>
Query logs with optional filters, merged by timestamp.
Sourcepub fn entries_for_node(&self, node_id: &str) -> Vec<RemoteLogEntry>
pub fn entries_for_node(&self, node_id: &str) -> Vec<RemoteLogEntry>
Get all entries for a specific node.
Sourcepub fn total_entries(&self) -> usize
pub fn total_entries(&self) -> usize
Total number of log entries across all nodes.
Sourcepub fn known_nodes(&self) -> Vec<String>
pub fn known_nodes(&self) -> Vec<String>
List all known node IDs.
Auto Trait Implementations§
impl !RefUnwindSafe for LogAggregator
impl Freeze for LogAggregator
impl Send for LogAggregator
impl Sync for LogAggregator
impl Unpin for LogAggregator
impl UnsafeUnpin for LogAggregator
impl UnwindSafe for LogAggregator
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