Skip to content
Français

StorageReservationOptions

import type { StorageReservationOptions } from "@elie-laloum/outpost";
  • transporterOptional
    Transport | undefined
    Transport that stores reservations/ledger; the sizes of all its other objects count as usage. Default: createLocalTransport under .outpost/storage, with usage measured from the files under .outpost/recovery, logs, locks, workspaces and storage.
  • maxBytesRequired
    number
    Limit for observed usage plus active reservations plus this request, in bytes; above it, admission rejects with code configuration. Must be a non-negative safe integer.
  • reserveBytesRequired
    number
    Bytes this reservation holds in the ledger until it is released. Must be a non-negative safe integer.
  • maxEntriesOptional
    number | undefined
    Maximum files and directories scanned under .outpost, or objects listed from an explicit transporter, default 100000. Exceeding it rejects admission with code configuration.
  • signalOptional
    AbortSignal | undefined
    Cancels admission with the abort reason until the entry is written. release() ignores it.
export interface StorageReservationOptions {
  readonly transporter?: Transport;
  readonly maxBytes: number;
  readonly reserveBytes: number;
  readonly maxEntries?: number;
  readonly signal?: AbortSignal;
}