Skip to main content

BaseEventsSummarizer

Trait BaseEventsSummarizer 

Source
pub trait BaseEventsSummarizer: Send + Sync {
    // Required method
    fn summarize_events<'life0, 'life1, 'async_trait>(
        &'life0 self,
        events: &'life1 [Event],
    ) -> Pin<Box<dyn Future<Output = Result<Option<Event>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for summarizing events during context compaction.

Implementations receive a window of events and produce a single compacted event containing a summary. The runner calls this when the compaction interval is reached.

Required Methods§

Source

fn summarize_events<'life0, 'life1, 'async_trait>( &'life0 self, events: &'life1 [Event], ) -> Pin<Box<dyn Future<Output = Result<Option<Event>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Summarize the given events into a single compacted event. Returns None if no compaction is needed (e.g., empty input).

Implementors§