CheckpointStore

Trait CheckpointStore 

Source
pub trait CheckpointStore: Send + Sync {
    // Required methods
    fn last_indexed_height<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = IndexerResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_last_indexed_height<'life0, 'async_trait>(
        &'life0 self,
        height: u64,
    ) -> Pin<Box<dyn Future<Output = IndexerResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Persists and retrieves the last fully indexed height.

Implementations must be durable and safe for concurrent callers.

Required Methods§

Source

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

Read the last successfully indexed height.

Source

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

Persist the last successfully indexed height atomically.

Implementors§