feat: add subscriptions

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-09-23 18:21:39 +02:00
parent c662d65799
commit 98550ace16
21 changed files with 431 additions and 130 deletions

View File

@@ -0,0 +1,12 @@
use std::sync::Arc;
use async_trait::async_trait;
use crate::{errors::TransportError, EventInfo};
#[async_trait]
pub trait Transport {
async fn publish(&self, event_info: &EventInfo, content: Vec<u8>)
-> Result<(), TransportError>;
}
pub type DynTransport = Arc<dyn Transport + Send + Sync + 'static>;