pub struct LogsRepository { /* private fields */ }
Expand description
LogsRepository holds all diagnostics data and is a singleton wrapped by multiple
[pipeline::Pipeline
]s in a given Archivist instance.
Implementations§
Source§impl LogsRepository
impl LogsRepository
pub fn new( logs_max_cached_original_bytes: u64, initial_interests: impl Iterator<Item = ComponentInitialInterest>, parent: &Node, scope: Scope, ) -> Arc<Self>
Sourcepub fn drain_debuglog<K>(self: &Arc<Self>, klog_reader: K)
pub fn drain_debuglog<K>(self: &Arc<Self>, klog_reader: K)
Drain the kernel’s debug log. The returned future completes once existing messages have been ingested.
pub fn logs_cursor_raw( &self, mode: StreamMode, parent_trace_id: Id, ) -> impl Stream<Item = CursorItem> + Send
pub fn logs_cursor( &self, mode: StreamMode, selectors: Option<Vec<Selector>>, parent_trace_id: Id, ) -> impl Stream<Item = Arc<LogsData>> + Send + 'static
pub fn get_log_container( self: &Arc<Self>, identity: Arc<ComponentIdentity>, ) -> Arc<LogsArtifactsContainer>
Sourcepub async fn wait_for_termination(&self)
pub async fn wait_for_termination(&self)
Waits until stop_accepting_new_log_sinks
is called and all log sink tasks have completed.
After that, any pending Cursors will return Poll::Ready(None).
Sourcepub fn stop_accepting_new_log_sinks(&self)
pub fn stop_accepting_new_log_sinks(&self)
Closes the connection in which new logger draining tasks are sent. No more logger tasks will be accepted when this is called and we’ll proceed to terminate logs.
Sourcepub fn new_interest_connection(&self) -> usize
pub fn new_interest_connection(&self) -> usize
Returns an id to use for a new interest connection. Used by both LogSettings and Log, to ensure shared uniqueness of their connections.
Sourcepub fn update_logs_interest(
&self,
connection_id: usize,
selectors: Vec<LogInterestSelector>,
)
pub fn update_logs_interest( &self, connection_id: usize, selectors: Vec<LogInterestSelector>, )
Updates log selectors associated with an interest connection.
Sourcepub fn finish_interest_connection(&self, connection_id: usize)
pub fn finish_interest_connection(&self, connection_id: usize)
Indicates that the connection associated with the given ID is now done.