Base interface for event summarizers. Implementations convert a list of events into a single compaction event.

interface EventsSummarizer {
    maybeSummarizeEvents(events: Event[]): Promise<Event>;
}

Implemented by

Methods

  • Attempts to summarize a list of events into a single compaction event.

    Parameters

    • events: Event[]

      The events to summarize

    Returns Promise<Event>

    A compaction carrier event with actions.compaction set, or undefined if no summarization is needed