MetricCollector

Trait MetricCollector 

Source
pub trait MetricCollector: Send + Sync {
    // Required methods
    fn collect(&self) -> DeviceResult<Vec<Metric>>;
    fn name(&self) -> &str;
    fn interval(&self) -> Duration;
    fn is_enabled(&self) -> bool;
}
Expand description

Metric collector trait

Required Methods§

Source

fn collect(&self) -> DeviceResult<Vec<Metric>>

Collect metrics

Source

fn name(&self) -> &str

Get collector name

Source

fn interval(&self) -> Duration

Get collection interval

Source

fn is_enabled(&self) -> bool

Check if collector is enabled

Implementors§