19 lines
389 B
Rust
19 lines
389 B
Rust
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<String>;
|
|
async fn append_index(
|
|
&self,
|
|
topic: &str,
|
|
segment_file: &str,
|
|
time: SystemTime,
|
|
) -> anyhow::Result<()>;
|
|
}
|