Skip to main content

Message

Enum Message 

Source
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

§role: Side
§pid: u32
§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: ProtoVersion
§proto_max: ProtoVersion
§capabilities: Capabilities
§

HelloAck

Supervisor confirms negotiated version and assigns the handoff id.

Fields

§proto_version_chosen: ProtoVersion
§handoff_id: HandoffId
§

PrepareHandoff

S asks O to begin draining.

Fields

§handoff_id: HandoffId
§successor_pid: u32
§deadline_ms: u64
§drain_grace_ms: u64
§

Drained

O reports drain complete.

Fields

§open_conns_remaining: u32
§accept_closed: bool
§

SealRequest

S asks O to seal.

Fields

§handoff_id: HandoffId
§

SealProgress

Optional progress heartbeat during a long-running seal.

Fields

§shards_sealed: u32
§shards_total: u32
§last_revision: u64
§

SealComplete

O reports seal complete and has released the flock.

Fields

§handoff_id: HandoffId
§last_revision_per_shard: Vec<u64>
§data_dir_fingerprint: [u8; 32]
§

SealFailed

O reports seal failure; flock is still held; O can resume.

Fields

§handoff_id: HandoffId
§error: String
§partial_state: String
§

Begin

S cues N to acquire the flock, open state, and start serving.

Fields

§handoff_id: HandoffId
§

Ready

N declares readiness; supervisor may now commit O.

Fields

§handoff_id: HandoffId
§listening_on: Vec<String>
§healthz_ok: bool
§advertised_revision_per_shard: Vec<u64>
§

Commit

S tells O it may exit.

Fields

§handoff_id: HandoffId
§

Abort

S tells O or N to abort the in-flight handoff and roll back.

Fields

§handoff_id: HandoffId
§reason: String
§

ResumeAfterAbort

S tells O to reopen its writer state after a post-seal abort.

Fields

§handoff_id: HandoffId
§

Heartbeat

Liveness heartbeat. Each side emits one every second during a handoff; a 5s gap is treated as peer-died.

Fields

§ts_ms: u64

Trait Implementations§

Source§

impl Clone for Message

Source§

fn clone(&self) -> Message

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Message

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Message

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Message

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,