Skip to main content

OutputProcessor

Trait OutputProcessor 

Source
pub trait OutputProcessor: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn process<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: StreamEvent,
        ctx: &'life1 ProtectionContext,
    ) -> Pin<Box<dyn Future<Output = Result<ProcessedEvent>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Output Processor trait

Processors run AFTER kernel execution, BEFORE storage/streaming. They MUST NOT mutate execution state (streaming is read-only).

Required Methods§

Source

fn name(&self) -> &str

Processor name for logging/metrics

Source

fn process<'life0, 'life1, 'async_trait>( &'life0 self, event: StreamEvent, ctx: &'life1 ProtectionContext, ) -> Pin<Box<dyn Future<Output = Result<ProcessedEvent>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Process an event before storage/streaming

§Arguments
  • event - The event to process
  • ctx - Protection context (destination, tenant, etc.)
§Returns

The processed event, potentially transformed

Implementors§