brinkhaustools

Trait StatusSource

Source
pub trait StatusSource: Send + Sync {
    // Required methods
    fn get_status(&self) -> Value;
    fn get_name(&self) -> &str;
    fn refresh_interval(&self) -> Duration;
}
Expand description

Trait for pluggable status sources.

Required Methods§

Source

fn get_status(&self) -> Value

Return current status as JSON.

Source

fn get_name(&self) -> &str

Human-readable name for this source.

Source

fn refresh_interval(&self) -> Duration

How often this source should be polled.

Implementors§