pub struct ArchiveReader { /* private fields */ }
Expand description
Utility for reading inspect data of a running component using the injected Archive Reader service.
Implementations§
Source§impl ArchiveReader
impl ArchiveReader
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new data fetcher with default configuration:
- Maximum retries: 2^64-1
- Timeout: Never. Use with_timeout() to set a timeout.
pub fn with_archive(&mut self, archive: ArchiveAccessorProxy) -> &mut Self
Sourcepub fn add_selector(&mut self, selector: impl ToSelectorArguments) -> &mut Self
pub fn add_selector(&mut self, selector: impl ToSelectorArguments) -> &mut Self
Requests a single component tree (or sub-tree).
Sourcepub fn select_all_for_moniker(&mut self, moniker: &str) -> &mut Self
pub fn select_all_for_moniker(&mut self, moniker: &str) -> &mut Self
Requests all data for the component identified by the given moniker.
Sourcepub fn retry(&mut self, config: RetryConfig) -> &mut Self
pub fn retry(&mut self, config: RetryConfig) -> &mut Self
Sets a custom retry configuration. By default we always retry.
pub fn add_selectors<T, S>(&mut self, selectors: T) -> &mut Selfwhere
T: Iterator<Item = S>,
S: ToSelectorArguments,
Sourcepub fn with_timeout(&mut self, duration: MonotonicDuration) -> &mut Self
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.
pub fn with_aggregated_result_bytes_limit( &mut self, limit_bytes: u64, ) -> &mut Self
Sourcepub fn with_batch_retrieval_timeout_seconds(
&mut self,
timeout: i64,
) -> &mut Self
pub fn with_batch_retrieval_timeout_seconds( &mut self, timeout: i64, ) -> &mut Self
Set the maximum time to wait for a wait for a single component to have its diagnostics data “pumped”.
Sourcepub fn with_minimum_schema_count(
&mut self,
minimum_schema_count: usize,
) -> &mut Self
pub fn with_minimum_schema_count( &mut self, minimum_schema_count: usize, ) -> &mut Self
Sets the minumum number of schemas expected in a result in order for the result to be considered a success.
Sourcepub async fn snapshot<D>(&self) -> Result<Vec<Data<D>>, Error>where
D: DiagnosticsData,
pub async fn snapshot<D>(&self) -> Result<Vec<Data<D>>, Error>where
D: DiagnosticsData,
Connects to the ArchiveAccessor and returns data matching provided selectors.
Sourcepub fn snapshot_then_subscribe<D>(&self) -> Result<Subscription<Data<D>>, Error>where
D: DiagnosticsData + 'static,
pub fn snapshot_then_subscribe<D>(&self) -> Result<Subscription<Data<D>>, Error>where
D: DiagnosticsData + 'static,
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.
Sourcepub async fn snapshot_raw<D, T>(&self) -> Result<T, Error>where
D: DiagnosticsData,
T: for<'a> Deserialize<'a> + SerializableValue + From<Vec<T>> + CheckResponse,
pub async fn snapshot_raw<D, T>(&self) -> Result<T, Error>where
D: DiagnosticsData,
T: for<'a> Deserialize<'a> + SerializableValue + From<Vec<T>> + CheckResponse,
Connects to the ArchiveAccessor and returns inspect data matching provided selectors. Returns the raw json for each hierarchy fetched.
Sourcepub fn snapshot_then_subscribe_raw<D, T>(
&self,
) -> Result<Subscription<T>, Error>where
D: DiagnosticsData + 'static,
T: for<'a> Deserialize<'a> + Send + SerializableValue + 'static,
pub fn snapshot_then_subscribe_raw<D, T>(
&self,
) -> Result<Subscription<T>, Error>where
D: DiagnosticsData + 'static,
T: for<'a> Deserialize<'a> + Send + SerializableValue + 'static,
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.
Trait Implementations§
Source§impl Clone for ArchiveReader
impl Clone for ArchiveReader
Source§fn clone(&self) -> ArchiveReader
fn clone(&self) -> ArchiveReader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ArchiveReader
impl !RefUnwindSafe for ArchiveReader
impl Send for ArchiveReader
impl Sync for ArchiveReader
impl Unpin for ArchiveReader
impl !UnwindSafe for ArchiveReader
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)