reserveRecoveryStorage
Purpose and behavior
Section titled “Purpose and behavior”Record reserveBytes in the repository’s reservation ledger when observed usage, active reservations and the request fit within maxBytes, and return the reservation. Refusal, an incomplete inventory, invalid options or a malformed ledger reject with code configuration. The entry counts until release() and never expires; Outpost has no call to clear an abandoned one.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredRecoveryStorageReservationOptionsRepository, byte limit, bytes to reserve, ledger transport, scan limit and cancellation.options.repositoryOptionalstring | undefinedGit checkout whose writers share the ledger, default process.cwd(), resolved to its top-level directory. Without transporter, its .outpost holds the ledger and is measured; a missing directory rejects with code workspace.options.transporterOptionalTransport | undefinedTransport 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.options.maxBytesRequirednumberLimit 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.options.reserveBytesRequirednumberBytes this reservation holds in the ledger until it is released. Must be a non-negative safe integer.options.maxEntriesOptionalnumber | undefinedMaximum files and directories scanned under .outpost, or objects listed from an explicit transporter, default 100000. Exceeding it rejects admission with code configuration.options.signalOptionalAbortSignal | undefinedCancels admission with the abort reason until the entry is written. release() ignores it.