use eyre::Result; use async_trait::async_trait; use tokio::sync::{mpsc, oneshot}; use std::sync::Arc; use crate::event::Event; #[async_trait] pub trait Endpoint { fn name(&self) -> String; fn is_active(&self) -> bool; async fn listen(self: Arc, event_sender: oneshot::Sender>>, event_handler: mpsc::Sender); }