Interface IEventStore

A run's events: stable ids, a sequence number per run, and payloads a purge removes.

interface IEventStore {
    forget?(runId): Promise<void>;
    append(event): Promise<{
        inserted: boolean;
        seq: number;
    }>;
    read(runId, fromSeq, limit?): Promise<MeetingEvent[]>;
    fence(runId): Promise<void>;
    purgePayloads(runId): Promise<void>;
}

Implemented by

Methods

  • Optional whole-run eviction for in-memory hosts after terminal cleanup and the retention grace. Durable stores omit it to retain their records. Call only after producers have stopped; forgetting removes fences too.

    Parameters

    • runId: string

    Returns Promise<void>

  • Inserts with the next sequence number of the run; a repeated eventId is not inserted and answers the existing sequence. Behind the fence a content event is stored without its payload, marked purged.

    Parameters

    Returns Promise<{
        inserted: boolean;
        seq: number;
    }>