Skip to content
Français

StorageReservation

import type { StorageReservation } from "@elie-laloum/outpost";
  • idRequired
    string
    Random UUID that keys this reservation in reservations/ledger.
  • repositoryRequired
    string
    Top-level directory of the resolved Git checkout.
  • reserveBytesRequired
    number
    Bytes this reservation holds in the ledger.
  • releaseRequired
    () => Promise<void>
    Remove this entry from the ledger with a conditional write. Later calls resolve without effect; a release that failed can be retried.
  • [Symbol.asyncDispose]Required
    () => Promise<void>
    Same as release(), so an await using scope releases the reservation when it ends.
export interface StorageReservation {
  readonly id: string;
  readonly repository: string;
  readonly reserveBytes: number;
  release(): Promise<void>;
  [Symbol.asyncDispose](): Promise<void>;
}