rnetmon/src/monitor.rs

12 lines
281 B
Rust

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