Skip to main content

EventStore

Trait EventStore 

Source
pub trait EventStore: Send + Sync {
    // Required methods
    fn append<'life0, 'async_trait>(
        &'life0 self,
        event: ExecutionEvent,
    ) -> Pin<Box<dyn Future<Output = Result<EventLogEntry>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_by_execution<'life0, 'life1, 'async_trait>(
        &'life0 self,
        execution_id: &'life1 ExecutionId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<EventLogEntry>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_after<'life0, 'async_trait>(
        &'life0 self,
        after_sequence: u64,
        limit: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<EventLogEntry>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn latest_sequence<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Event store trait - persistence backend

Required Methods§

Source

fn append<'life0, 'async_trait>( &'life0 self, event: ExecutionEvent, ) -> Pin<Box<dyn Future<Output = Result<EventLogEntry>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Append an event to the log

Source

fn get_by_execution<'life0, 'life1, 'async_trait>( &'life0 self, execution_id: &'life1 ExecutionId, ) -> Pin<Box<dyn Future<Output = Result<Vec<EventLogEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get events for an execution

Source

fn get_after<'life0, 'async_trait>( &'life0 self, after_sequence: u64, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<EventLogEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get events after a sequence number

Source

fn latest_sequence<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the latest sequence number

Implementors§