LiveSource

Trait LiveSource 

Source
pub trait LiveSource: Send + Sync {
    // Required methods
    fn consume_live<'life0, 'async_trait>(
        &'life0 self,
        start_from_height_exclusive: u64,
        sender: Sender<(Updates, DatasourceId)>,
        cancellation_token: CancellationToken,
        metrics: Arc<MetricsCollection>,
        reconnection_notifier: Sender<()>,
    ) -> Pin<Box<dyn Future<Output = IndexerResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_types(&self) -> Vec<UpdateType>;
}
Expand description

Streams live updates as the chain advances.

Implementations should begin from the provided height (exclusive) and emit only newer updates, resuming seamlessly across restarts if possible.

Required Methods§

Source

fn consume_live<'life0, 'async_trait>( &'life0 self, start_from_height_exclusive: u64, sender: Sender<(Updates, DatasourceId)>, cancellation_token: CancellationToken, metrics: Arc<MetricsCollection>, reconnection_notifier: Sender<()>, ) -> Pin<Box<dyn Future<Output = IndexerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Start live streaming from the specified height (exclusive).

Source

fn update_types(&self) -> Vec<UpdateType>

Advertise live update kinds this source will emit.

Implementors§