IFClite TypeScript API
    Preparing search index...

    Interface Persistence

    interface Persistence {
        append(roomId: string, update: Uint8Array): Promise<void>;
        compact(roomId: string, mergedState: Uint8Array): Promise<void>;
        drop(roomId: string): Promise<void>;
        load(roomId: string): Promise<Uint8Array<ArrayBufferLike> | null>;
    }

    Implemented by

    Index
    • Append update to roomId's log.

      Parameters

      • roomId: string
      • update: Uint8Array

      Returns Promise<void>

    • Replace the room's log with a freshly compacted state (called periodically).

      Parameters

      • roomId: string
      • mergedState: Uint8Array

      Returns Promise<void>

    • Hard-delete a room.

      Parameters

      • roomId: string

      Returns Promise<void>

    • Load any saved updates for roomId and return them as a single merged blob.

      Parameters

      • roomId: string

      Returns Promise<Uint8Array<ArrayBufferLike> | null>