Interface IndexedStorage

Messages are grouped and deduplicated using a unique index. It can be seen as a database, although we are trying to provide connectors with other scalable systems like AWS S3 or AWS DynamoDB.

interface IndexedStorage {
    add(groupId, entryId, payload): Promise<void>;
    listEntries(groupId): AsyncGenerator<string[], any, unknown>;
    listGroups(): AsyncGenerator<string[], any, unknown>;
    loadEntriesPayloads(groupId, entriesIds): Promise<Record<string, MessagePayload>>;
}

Methods

  • Add entry to the storage.

    Parameters

    Returns Promise<void>

  • Loads entries for groupId in chunks.

    Parameters

    • groupId: string

    Returns AsyncGenerator<string[], any, unknown>

  • Loads groups in chunks.

    Returns AsyncGenerator<string[], any, unknown>

  • Loads message payloads for the specificed entries.

    Parameters

    • groupId: string
    • entriesIds: string[]

    Returns Promise<Record<string, MessagePayload>>