Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

Snapshot wire types and chunk codec for array CRDT sync.

A TileSnapshot captures the full state of a tile coord-range at a specific HLC. Snapshots are used for catch-up replication (first connect, long disconnect, after log GC) so receivers can resume the op-stream from TileSnapshot::snapshot_hlc without replaying the full op history.

The actual snapshot builder (which walks engine state) lands in Phase F (Origin). This file ships only the wire shape and the streaming chunk codec.

Structs§

CoordRange
A half-open coordinate range [lo, hi).
SnapshotChunk
One chunk of a streaming TileSnapshot.
SnapshotHeader
Metadata header sent before the chunk stream begins.
TileSnapshot
Full state snapshot for a tile coord-range at a specific HLC.

Traits§

SnapshotSink
Receiver for completed snapshots during GC compaction.

Functions§

assemble_chunks
Reassemble a TileSnapshot from a header and a slice of chunks.
decode_snapshot
Decode a TileSnapshot from MessagePack bytes produced by encode_snapshot.
encode_snapshot
Encode a TileSnapshot to MessagePack bytes.
split_into_chunks
Split a TileSnapshot into a header plus a sequence of fixed-size chunks.