Skip to main content

Module protocol

Module protocol 

Source
Expand description

The client<->daemon wire protocol (version 6).

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.

A *_wire_v6 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;

Modules§

channelDeprecated
The shepherd channel’s wire types. Moved to the shep-channel crate; this path is kept so consumers of 0.1.x do not break. Use shep_core::protocol directly 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§

ChildMessage
Child -> daemon shepherd-channel message (spec §7, kebab-case kinds)
ShepherdMessage
Daemon -> child message

Constants§

CHANNEL_VERSION
The value the shepherd exports as SHEP_CHANNEL_VERSION to every child it opens a channel for.
PROTOCOL_VERSION
Wire protocol version.