rnetmon/src/monitor.rs

12 lines
263 B
Rust

use crate::message::Message;
pub use std::collections::HashMap;
pub use std::sync::mpsc;
pub trait Monitor {
fn new(config: &HashMap<String, serde_yaml::Value>) -> Self
where
Self: Sized;
fn run(&mut self, sender: &mpsc::Sender<Message>);
}