Expand description
v1 broker protocol module.
Phase 0 of #228 introduced the prost-generated wire types from
proto/broker_v1_*.proto. Phase 1 (#230) adds the framing
read/write helpers used by every connection.
All three .proto files share the running_process.broker.v1
package, so prost-build emits a single Rust module containing
every message and enum (Frame, Hello, HelloReply, Refused,
Negotiated, AdminRequest, AdminReply, CacheManifest, ServiceDefinition,
LifecycleEvent, …).
The prost-generated types are re-exported at the top of this
module so existing call sites importing them under
running_process::broker::protocol::* keep working.
Re-exports§
pub use frame_ext::encode_framed;pub use frame_ext::try_decode_framed;pub use frame_ext::DecodedFramed;pub use frame_ext::EndpointNameError;pub use frame_ext::FRAME_HEADER_BYTES;pub use framing::read_frame;pub use framing::read_frame_with_cap;pub use framing::write_frame;pub use framing::FramingError;pub use framing::ENVELOPE_VERSION;pub use framing::MAX_FRAME_BYTES;pub use framing::MAX_HELLO_BYTES;pub use registry::ADMIN_PAYLOAD_PROTOCOL;pub use registry::BACKEND_HANDLE_PROBE_PAYLOAD_PROTOCOL;pub use registry::CONTROL_PAYLOAD_PROTOCOL;pub use registry::FBUILD_PAYLOAD_PROTOCOL;pub use registry::HANDOFF_PAYLOAD_PROTOCOL;pub use registry::PROTOCOL_VERSION;pub use registry::ZCCACHE_PAYLOAD_PROTOCOL;pub use validate::validate_frame_envelope;pub use validate::FrameValidationError;
Modules§
- frame_
ext - Ergonomic constructors and buffer-level codecs for the v1
Frameenvelope (#412). - framing
- v1 broker wire framing —
[u8 framing_version][u32 LE body_length][prost body]. - hello_
reply - Nested message and enum types in
HelloReply. - registry
- Single authoritative registry of v1 broker wire-protocol constants (#375).
- validate
- Shared v1 frame-envelope validation (#376).
Structs§
- Admin
Reply - Admin
Request - Cache
Manifest - Cache
Root - Cleanup
Policy - Daemon
Process - Endpoint
- Frame
- Every control-plane frame on a broker connection.
- Handoff
Ack - Backend -> broker acknowledgement of a HandoffOffer. Rides Frame.payload with kind = FRAME_KIND_RESPONSE and payload_protocol = 0xD0FF on the same control connection.
- Handoff
Offer - Broker -> backend offer to adopt a handed-off client connection (#354 slice 6). Rides Frame.payload with kind = FRAME_KIND_REQUEST and payload_protocol = 0xD0FF (HANDOFF_PAYLOAD_PROTOCOL in code) on the broker<->backend control connection, mirroring how Hello (0x00), admin verbs (0xAD01), and endpoint probes (0xB232) ride the envelope.
- Hello
- Required first message on every new connection to a broker pipe.
- Hello
Reply - Host
Identity - Lifecycle
Event - Manifest
Ref - Negotiated
- Observability
Info - Operation
- Ownership
- Quota
- Refused
- Service
Definition - Teardown
Hook