pub trait PersistentStorage:
Send
+ Sync
+ Debug
+ 'static {
// Required methods
fn append_message<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
msg: StreamMessage,
) -> Pin<Box<dyn Future<Output = Result<u64, PersistentStorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
start: StartPosition,
) -> Pin<Box<dyn Future<Output = Result<TopicStream, PersistentStorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn ack_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
up_to_offset: u64,
) -> Pin<Box<dyn Future<Output = Result<(), PersistentStorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn flush<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), PersistentStorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A persistent storage interface for a topic.
Required Methods§
Sourcefn append_message<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
msg: StreamMessage,
) -> Pin<Box<dyn Future<Output = Result<u64, PersistentStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append_message<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
msg: StreamMessage,
) -> Pin<Box<dyn Future<Output = Result<u64, PersistentStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Append a message to a topic and return the assigned offset.
Sourcefn create_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
start: StartPosition,
) -> Pin<Box<dyn Future<Output = Result<TopicStream, PersistentStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
start: StartPosition,
) -> Pin<Box<dyn Future<Output = Result<TopicStream, PersistentStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a streaming reader starting from the provided position.
Sourcefn ack_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
up_to_offset: u64,
) -> Pin<Box<dyn Future<Output = Result<(), PersistentStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ack_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
topic_name: &'life1 str,
up_to_offset: u64,
) -> Pin<Box<dyn Future<Output = Result<(), PersistentStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Acknowledge internal checkpoints (used by background uploader/compactor).