myko_rs/
module.rs

1use async_trait::async_trait;
2// use tokio::sync::mpsc::Sender;
3
4use crate::event::MEvent;
5
6#[async_trait]
7pub trait Module {
8    fn new() -> Self
9    where
10        Self: Sized;
11
12    // async fn handle_query(
13    //     &mut self,
14    //     query: Query,
15    // ) -> Option<tokio::sync::mpsc::Receiver<QueryResponse>>;
16
17    async fn process_event(&mut self, event: MEvent, persist: bool);
18
19    fn entity_name(&self) -> String;
20
21    // async fn start_kafka(&mut self, brokers: &[&str], from_kafka_tx: Sender<MEvent>);
22}