supermon/
consumer.rs

1use async_trait::async_trait;
2use tokio::sync::broadcast;
3use tokio::sync::mpsc::Receiver;
4
5#[async_trait]
6pub trait Consumer {
7    type Payload;
8    async fn consume(&self, mut rx: Receiver<Self::Payload>);
9    async fn consume_broadcast(&self, mut rx: broadcast::Receiver<Self::Payload>);
10}