pub enum ChildMessage {
Ready,
Metric {
name: String,
value: f64,
metric_type: Option<MetricType>,
labels: BTreeMap<String, String>,
help: Option<String>,
},
ActionReply {
action: String,
body: String,
id: Option<u64>,
},
LambLabel {
pid: u32,
label: LambLabel,
},
Note {
name: String,
value: f64,
},
}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
Names and labels carry no grammar check here: the metrics dog enforces that when it reads them. Do not add a half check to this crate.
Fields
metric_type: Option<MetricType>What kind of number this is. Absent on the wire means gauge.
Wire key type: a Rust field named kind would collide with
the tag. An unknown string fails to decode, so the shepherd
drops the frame as malformed rather than guessing a kind.
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. Then the
daemon falls back to matching by name and order.
LambLabel
Names one of this sheep’s lambs for shep describe and lookout.
Shown only while pid is in the sheep’s own process tree. An empty
label clears the one pid had.
Fields
Note
A name and a number for a dog, published as channel.note
Not a metric sample: the metrics dog never reads one. No grammar
check on name, no labels and no help.
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