PushWorkHandler

Trait PushWorkHandler 

Source
pub trait PushWorkHandler: Send + Sync {
    // Required methods
    fn handle_payload<'life0, 'async_trait>(
        &'life0 self,
        payload: Bytes,
    ) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_metrics(
        &self,
        endpoint: &Endpoint,
        metrics_labels: Option<&[(&str, &str)]>,
    ) -> Result<()>;
}

Required Methods§

Source

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

Source

fn add_metrics( &self, endpoint: &Endpoint, metrics_labels: Option<&[(&str, &str)]>, ) -> Result<()>

Add metrics to the handler

Implementors§

Source§

impl<T, U> PushWorkHandler for Ingress<SingleIn<T>, ManyOut<U>>
where T: Data + for<'de> Deserialize<'de> + Debug, U: Data + Serialize + MaybeError + Debug,