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 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;
Modules§
- framing
- v1 broker wire framing —
[u8 framing_version][u32 LE body_length][prost body]. - hello_
reply - Nested message and enum types in
HelloReply.
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