Skip to main content

Module types

Module types 

Source
Expand description

Shared types, constants, and error definitions for the backup envelope.

Structs§

Envelope
Decoded envelope.
EnvelopeMeta
Header metadata captured at backup time.
Section
One contiguous body produced by one origin node.
SourceTombstoneEntry
Single source-side tombstone entry. purge_lsn is the Origin WAL LSN at which the hard-delete committed — restore uses it as a per-collection replay barrier so rows older than the purge don’t resurrect.
StoredCollectionBlob
Single catalog-row entry in a catalog-rows section. The outer container is Vec<StoredCollectionBlob> msgpack-encoded into the section body. Bytes are the zerompk-encoded StoredCollection from the nodedb crate — nodedb-types intentionally doesn’t depend on the nodedb catalog types, so the blob is opaque here.

Enums§

EnvelopeError

Constants§

DEFAULT_MAX_SECTION_BYTES
Default cap on a single section body: 16 GiB.
DEFAULT_MAX_TOTAL_BYTES
Default cap on total envelope size: 16 GiB. Tunable per call.
HEADER_LEN
Header is fixed-size — 52 bytes (48 framed + 4 crc).
MAGIC
SECTION_ORIGIN_CATALOG_ROWS
Sentinel origin_node_id values that mark sections carrying metadata rather than per-node engine data. Restore handlers recognize the sentinel and route the body to the correct catalog writer. Section CRCs validate independently of whether the reader acts on the section body.
SECTION_ORIGIN_SOURCE_TOMBSTONES
SECTION_OVERHEAD
Per-section framing overhead: origin(8) + len(4) + crc(4).
TRAILER_LEN
Trailing crc.
VERSION
Backup envelope version stamped in byte 4 of every envelope header. Both plaintext and encrypted envelopes use version 1; the presence of the crypto block (68 bytes after the header) distinguishes them.

Functions§

read2
read4
read8