use std::time::SystemTime; use async_trait::async_trait; pub mod local; #[cfg(feature = "s3")] pub mod s3; #[async_trait] pub trait StorageBackend { async fn flush_segment(&self, topic: &str, buffer: &[u8]) -> anyhow::Result; async fn append_index( &self, topic: &str, segment_file: &str, time: SystemTime, ) -> anyhow::Result<()>; }