rnetmon/src/monitor.rs

12 lines
299 B
Rust
Raw Normal View History

2019-01-30 15:26:05 +00:00
use crate::message::Message;
2019-01-31 10:01:47 +00:00
pub use std::collections::HashMap;
2019-01-30 22:11:51 +00:00
pub use std::sync::mpsc;
2019-01-30 15:26:05 +00:00
pub trait Monitor {
2019-02-14 07:21:22 +00:00
fn new(config: &HashMap<String, serde_yaml::Value>) -> Result<Self, Box<dyn std::error::Error>>
2019-01-31 10:01:47 +00:00
where
Self: Sized;
fn run(&mut self, sender: &mpsc::Sender<Message>);
}