Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Type Alias PackStore

    type PackStore = {
        counters: PackCounters;
        applyDelta(delta: BundleDelta): Promise<void>;
        applyPredicted(predicted: Predicted): Promise<void>;
        compact(): Promise<boolean>;
        confirmPredicted(to: number, digest: string): Promise<void>;
        dropPredicted(): Promise<void>;
        estimateBeforeInstall(bytes: number): Promise<FitOutcome>;
        getRoutes(): Promise<SerializedRoute[]>;
        getRow(table: string, key: string): Promise<Plain | undefined>;
        getTemplates(): Promise<Record<string, CompiledTemplate>>;
        head(): Promise<PackHead | undefined>;
        installPack(
            source: AsyncIterable<Bytes>,
            options?: InstallOptions,
        ): Promise<InstallOutcome>;
        installRing(ring: Ring): Promise<RingOutcome>;
        putRoutes(
            routes: SerializedRoute[],
            templates?: Record<string, CompiledTemplate>,
        ): Promise<void>;
        recordCounts(): Promise<RecordCounts>;
        scanTable(table: string): Promise<BundleRows>;
    }
    Index
    • lays predicted rows over the pack without moving its version; a no-op when no pack is held

      Parameters

      Returns Promise<void>

    • moves to to with the predicted rows as the change; throws and keeps them when digest is not theirs

      Parameters

      • to: number
      • digest: string

      Returns Promise<void>

    • removes every predicted row and keeps the version

      Returns Promise<void>

    • Parameters

      • table: string
      • key: string

      Returns Promise<Plain | undefined>

    counters: PackCounters