pub enum Message {
Show 14 variants
Hello {
role: Side,
pid: u32,
build_id: Vec<u8>,
proto_min: ProtoVersion,
proto_max: ProtoVersion,
capabilities: Capabilities,
},
HelloAck {
proto_version_chosen: ProtoVersion,
handoff_id: HandoffId,
},
PrepareHandoff {
handoff_id: HandoffId,
successor_pid: u32,
deadline_ms: u64,
drain_grace_ms: u64,
},
Drained {
open_conns_remaining: u32,
accept_closed: bool,
},
SealRequest {
handoff_id: HandoffId,
},
SealProgress {
shards_sealed: u32,
shards_total: u32,
last_revision: u64,
},
SealComplete {
handoff_id: HandoffId,
last_revision_per_shard: Vec<u64>,
data_dir_fingerprint: [u8; 32],
},
SealFailed {
handoff_id: HandoffId,
error: String,
partial_state: String,
},
Begin {
handoff_id: HandoffId,
},
Ready {
handoff_id: HandoffId,
listening_on: Vec<String>,
healthz_ok: bool,
advertised_revision_per_shard: Vec<u64>,
},
Commit {
handoff_id: HandoffId,
},
Abort {
handoff_id: HandoffId,
reason: String,
},
ResumeAfterAbort {
handoff_id: HandoffId,
},
Heartbeat {
ts_ms: u64,
},
}Expand description
One control-channel message. Variants correspond 1:1 to the rows of the
wire-protocol table in ARCHITECTURE.md.
Variants§
Hello
Peer announces its identity and supported protocol range.
Fields
build_id: Vec<u8>Implementation-defined build identifier (e.g. GNU build-id, length 20). Variable length to accommodate sha-1 / sha-256 / git-sha hex.
proto_min: ProtoVersionproto_max: ProtoVersioncapabilities: CapabilitiesHelloAck
Supervisor confirms negotiated version and assigns the handoff id.
PrepareHandoff
S asks O to begin draining.
Drained
O reports drain complete.
SealRequest
S asks O to seal.
SealProgress
Optional progress heartbeat during a long-running seal.
SealComplete
O reports seal complete and has released the flock.
SealFailed
O reports seal failure; flock is still held; O can resume.
Begin
S cues N to acquire the flock, open state, and start serving.
Ready
N declares readiness; supervisor may now commit O.
Fields
Commit
S tells O it may exit.
Abort
S tells O or N to abort the in-flight handoff and roll back.
ResumeAfterAbort
S tells O to reopen its writer state after a post-seal abort.
Heartbeat
Liveness heartbeat. Each side emits one every second during a handoff; a 5s gap is treated as peer-died.