Type Alias LogsArchiveReader

Source
pub type LogsArchiveReader = ArchiveReader<Logs>;
Expand description

Alias for ArchiveReader. Used for reading logs.

Aliased Type§

struct LogsArchiveReader { /* private fields */ }

Implementations

Source§

impl ArchiveReader<Logs>

Source

pub fn logs() -> Self

Creates an ArchiveReader for reading logs

Source

pub async fn snapshot(&self) -> Result<Vec<Data<Logs>>, Error>

Connects to the ArchiveAccessor and returns data matching provided selectors.

Source

pub fn snapshot_then_subscribe(&self) -> Result<Subscription, Error>

Connects to the ArchiveAccessor and returns a stream of data containing a snapshot of the current buffer in the Archivist as well as new data that arrives.

Source§

impl<T: DiagnosticsDataType> ArchiveReader<T>

Source

pub fn with_archive(&mut self, archive: ArchiveAccessorProxy) -> &mut Self

Initializes the ArchiveReader with a custom connection to an ArchiveAccessor. By default, the connection will be initialized by connecting to fuchsia.diagnostics.ArchiveAccessor

Source

pub fn with_minimum_schema_count( &mut self, minimum_schema_count: usize, ) -> &mut Self

Sets the minimum number of schemas expected in a result in order for the result to be considered a success.

Source

pub fn retry(&mut self, config: RetryConfig) -> &mut Self

Sets a custom retry configuration. By default we always retry.

Source

pub fn with_timeout(&mut self, duration: MonotonicDuration) -> &mut Self

Sets the maximum time to wait for a response from the Archive. Do not use in tests unless timeout is the expected behavior.

Source

pub fn select_all_for_component( &mut self, component: impl ToComponentSelectorArguments, ) -> &mut Self

Filters logs for a specific component or component selector. If string input, the string may be either a component selector string or a moniker, or a ComponentSelector may be passed directly.