Expand description
The client<->daemon wire protocol (version 7).
Typed request/response enums plus bus events. Framing lives in
wire; a serialized shape change bumps PROTOCOL_VERSION.
Version 4 bumped on an addition. Version 5 bumped on a new AppConfig
field: that struct is deny_unknown_fields, so the additive rule below
does not cover it and an older daemon cannot decode depends_on.
Version 6 bumped on a retype: Response::Reloading became a struct
variant to carry the apps a staged reload refused, so it serializes as
an object where an older peer reads an array. Version 7 bumped on the
same retype applied to Response::Restarted, which a staged restart
refuses apps of for the same reason and had nowhere to name them.
A *_wire_v7 test pins today’s shape. A
v1_*_fixture_still_deserializes test pins an old peer’s payload and
never renames.
Re-exports§
pub use events::BusEvent;pub use events::ProcessEventKind;pub use frame::ServerFrame;pub use request::ActionOutcome;pub use request::ActionReply;pub use request::DogSectionToml;pub use request::DogSource;pub use request::EnvValue;pub use request::Envelope;pub use request::ExitInfo;pub use request::Hello;pub use request::HelloAck;pub use request::HelloReply;pub use request::Lamb;pub use request::LineOutcome;pub use request::LineReply;pub use request::ProcessInfo;pub use request::ProcessInfoBuilder;pub use request::Reply;pub use request::Request;pub use request::Response;pub use request::RpcError;pub use request::RpcErrorCode;pub use request::SelectorSpec;pub use request::SheepApplied;pub use request::SheepConfigView;pub use request::SheepDrift;pub use request::SheepRefusal;pub use request::SignalOutcome;pub use request::SignalReply;pub use request::Smit;pub use request::SmitError;pub use request::sort_flock;pub use wire::MAX_FRAME_BYTES;pub use wire::WireError;pub use wire::codec;pub use wire::decode_frame;pub use wire::encode_frame;pub use wire::reply_id;
Modules§
- channel
Deprecated - The shepherd channel’s wire types. Moved to the
shep-channelcrate; this path is kept so consumers of 0.1.x do not break. Useshep_core::protocoldirectly instead. - events
- Bus events broadcast to subscribed clients
- frame
- Anything the daemon writes to a connected client
- request
- RPC frames: requests, responses, envelopes, and structured errors
- wire
- Frame encoding shared by daemon and client Frame encoding: u32 length prefix + JSON payload
Enums§
- Child
Message - Child -> daemon shepherd-channel message (spec §7, kebab-case kinds)
- Shepherd
Message - Daemon -> child message
Constants§
- CHANNEL_
VERSION - The value the shepherd exports as
SHEP_CHANNEL_VERSIONto every child it opens a channel for. - MIN_
SUPPORTED - The oldest protocol this build accepts from a peer.
- PROTOCOL_
VERSION - Wire protocol version.