pub enum ChildMessage {
Ready,
Metric {
name: String,
value: f64,
},
ActionReply {
action: String,
body: String,
id: Option<u64>,
},
}Expand description
Child→daemon shepherd-channel message (spec §7 — kebab-case kinds)
Variants§
Ready
{"kind":"ready"} — readiness signal (wait_ready gate)
Metric
Custom metric sample
ActionReply
Reply to a daemon-initiated action
Fields
id: Option<u64>The id of the ShepherdMessage::Action this answers, echoed
back verbatim. None when the app did not echo it.
Optional, and that is the whole design. An app that echoes gets
exact correlation: its reply reaches the wait that asked, even
when an earlier trigger of the same action name timed out and is
still owed a reply. An app that does not echo — every app written
before this field existed — sends no id key at all, and the
daemon falls back to matching by name and order exactly as it did
before. Nothing already speaking this channel breaks, which is
what makes the field additive on a wire with no handshake.
Trait Implementations§
Source§impl Clone for ChildMessage
impl Clone for ChildMessage
Source§fn clone(&self) -> ChildMessage
fn clone(&self) -> ChildMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more