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 grows fields over time with no hand-edit sweep needed across OUT-OF-TREE callers — it forbids a struct literal outside this crate, not inside it. sample_info() and ProcessInfoBuilder both still name every field and both still need updating the day a field is added; what the attribute buys is that nothing downstream does. deferred.md’s own ProcessInfo entry defers SPLITTING it into several smaller types, not growing it — this attribute plus ProcessInfo::builder is “deliberately the opposite of forcing the split early,” which is 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
SheepApplied
What one app’s Request::ApplyConfig did: the answer a load owes the operator who ran it
SheepDrift
One registered sheep whose stored config differs from a caller’s copy: the answer Request::ConfigDrift is asking for
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
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.

Functions§

sort_flock
Orders one flock listing the way every operator-facing surface presents one: by name, then by instance slot, then by id.

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.