pub enum MigrationMessage {
TakeSnapshot {
daemon_origin: u64,
target_node: u64,
},
SnapshotReady {
daemon_origin: u64,
snapshot_bytes: Vec<u8>,
seq_through: u64,
chunk_index: u32,
total_chunks: u32,
},
RestoreComplete {
daemon_origin: u64,
restored_seq: u64,
},
ReplayComplete {
daemon_origin: u64,
replayed_seq: u64,
target_head: CausalLink,
},
CutoverNotify {
daemon_origin: u64,
target_node: u64,
},
CleanupComplete {
daemon_origin: u64,
},
MigrationFailed {
daemon_origin: u64,
reason: MigrationFailureReason,
},
BufferedEvents {
daemon_origin: u64,
events: Vec<CausalEvent>,
},
ActivateTarget {
daemon_origin: u64,
},
ActivateAck {
daemon_origin: u64,
replayed_seq: u64,
},
}Expand description
Wire message types for the migration subprotocol (0x0500).
Variants§
TakeSnapshot
Phase 0→1: Request snapshot on source.
SnapshotReady
Phase 1→2: Snapshot taken, payload included.
Large snapshots are chunked across multiple SnapshotReady messages.
The receiver must reassemble all chunks (0..total_chunks) before
deserializing the snapshot. Single-chunk snapshots have
chunk_index = 0, total_chunks = 1.
Fields
RestoreComplete
Phase 2→3: Target restored daemon from snapshot.
Fields
ReplayComplete
Phase 3→4: Target finished replaying buffered events.
Fields
target_head: CausalLinkTarget’s chain head after replay. The orchestrator stamps
this into its SuperpositionState so continuity proofs
carry the real cryptographic anchor even when the
orchestrator lives on a third node and has no local
daemon registry entry to read from.
CutoverNotify
Phase 4: Source stops accepting writes, routing switches.
Fields
CleanupComplete
Phase 5: Source cleaned up.
MigrationFailed
Any phase: Abort migration.
Fields
reason: MigrationFailureReasonStructured reason code — source dispatches on this to
decide whether the migration is retriable. See
MigrationFailureReason.
BufferedEvents
Buffered events from source for replay on target.
Fields
events: Vec<CausalEvent>Events to replay, in causal order.
ActivateTarget
Phase 5→6: Source has cleaned up; target should now go live.
Emitted by the orchestrator once it observes CleanupComplete. The
target calls MigrationTargetHandler::activate in response and
replies with ActivateAck.
ActivateAck
Phase 6: Target has activated and is now authoritative.
Trait Implementations§
Source§impl Clone for MigrationMessage
impl Clone for MigrationMessage
Source§fn clone(&self) -> MigrationMessage
fn clone(&self) -> MigrationMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more