Skip to main content

Module request

Module request 

Source
Expand description

RPC frames: requests, responses, envelopes, and structured errors

Structs§

ActionReply
One matched sheep’s row in a Trigger reply.
DogSectionToml
A dog’s [dog.<name>] config section, carried as TOML text.
Envelope
A request frame
ExitInfo
Why a sheep’s process most recently stopped existing under this daemon.
Hello
Client’s opening frame
HelloAck
Daemon’s handshake answer
Lamb
One process the OS reports as a descendant of a sheep.
LineReply
One matched sheep’s row in a SendLine reply.
ProcessInfo
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, then cpu_percent/memory_bytes, then dog, then lambs, then last_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 overstated deferred.md’s own ProcessInfo entry 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 plus ProcessInfo::builder “deliberately the opposite of forcing the split early” — i.e. exactly what makes a field like last_exit cheap to add for a concrete operator need, not a reason to withhold one. Use ProcessInfo::builder to construct one; the fields stay pub, so reading them and assigning to them are both unchanged.
ProcessInfoBuilder
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
SignalReply
One matched sheep’s row in a Signal reply.
Smit
A short marker a dog attaches to a sheep for shep flock to paint.

Enums§

ActionOutcome
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.
LineOutcome
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 Request variants)
RpcErrorCode
Machine-readable RPC error codes
SelectorSpec
Serializable selector (mirror of crate::selector::ProcessSelector; regex travels as its source string)
SignalOutcome
What happened when the shepherd tried to deliver one signal.
SmitError
Why a string is not a Smit.

Type Aliases§

HelloReply
Handshake outcome: HelloAck or a typed refusal (spec §6 — version skew is an error, not silence). Same Ok/Err wire shape as Reply::result; refusals use RpcErrorCode::ProtocolMismatch.