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§
Sourcefn 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_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
Sourcefn 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 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
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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