Expand description
RPC frames: requests, responses, envelopes, and structured errors
Structs§
- Action
Reply - One matched sheep’s row in a
Triggerreply. - DogSection
Toml - A dog’s
[dog.<name>]config section, carried as TOML text. - Envelope
- A request frame
- Exit
Info - Why a sheep’s process most recently stopped existing under this daemon.
- Hello
- Client’s opening frame
- Hello
Ack - Daemon’s handshake answer
- Lamb
- One process the OS reports as a descendant of a sheep.
- Line
Reply - One matched sheep’s row in a
SendLinereply. - Process
Info - Snapshot of one sheep for listings and events
#[non_exhaustive]: this struct has now grown a field in five separate phases (out_file/err_file, thencpu_percent/memory_bytes, thendog, thenlambs, thenlast_exit) with no hand-edit sweep across the workspace for any of them — the attribute is paying for itself exactly as advertised. Corrected from an earlier version of this comment, which overstateddeferred.md’s ownProcessInfoentry as a warning against growing this struct at all: what that entry actually defers is SPLITTING it into several smaller types, and calls this attribute plusProcessInfo::builder“deliberately the opposite of forcing the split early” — i.e. exactly what makes a field likelast_exitcheap to add for a concrete operator need, not a reason to withhold one. UseProcessInfo::builderto construct one; the fields staypub, so reading them and assigning to them are both unchanged. - Process
Info Builder - Builds a
ProcessInfo, which is#[non_exhaustive]and so cannot be written as a struct literal outside this crate. - Reply
- A reply frame
- RpcError
- Structured RPC failure
- Signal
Reply - One matched sheep’s row in a
Signalreply. - Smit
- A short marker a dog attaches to a sheep for
shep flockto paint.
Enums§
- Action
Outcome - What happened when the daemon tried to deliver one sheep’s triggered action.
- DogSource
- Where a dog came from: this binary, or one an operator adopted.
- Line
Outcome - What happened when the shepherd tried to write one line to a sheep’s stdin.
- Request
- One RPC request (Phase 1 verb set; later phases extend)
- Response
- One RPC response (pairs with
Requestvariants) - RpcError
Code - Machine-readable RPC error codes
- Selector
Spec - Serializable selector (mirror of
crate::selector::ProcessSelector; regex travels as its source string) - Signal
Outcome - What happened when the shepherd tried to deliver one signal.
- Smit
Error - Why a string is not a
Smit.
Type Aliases§
- Hello
Reply - Handshake outcome:
HelloAckor a typed refusal (spec §6 — version skew is an error, not silence). SameOk/Errwire shape asReply::result; refusals useRpcErrorCode::ProtocolMismatch.