StreamProcessor

Trait StreamProcessor 

Source
pub trait StreamProcessor: Send + Sync {
    // Required methods
    fn process_event<'life0, 'async_trait>(
        &'life0 self,
        event: StreamingEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn process_batch<'life0, 'async_trait>(
        &'life0 self,
        events: Vec<StreamingEvent>,
    ) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn name(&self) -> &'static str;
    fn health_check<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Stream processor trait

Required Methods§

Source

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

Process a single event

Source

fn process_batch<'life0, 'async_trait>( &'life0 self, events: Vec<StreamingEvent>, ) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Process a batch of events

Source

fn name(&self) -> &'static str

Get processor name

Source

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

Get processor health status

Implementors§