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 crate::frame_v1::registry::ADMIN_PAYLOAD_PROTOCOL;pub use crate::frame_v1::registry::BACKEND_HANDLE_PROBE_PAYLOAD_PROTOCOL;pub use crate::frame_v1::registry::CONTROL_PAYLOAD_PROTOCOL;pub use crate::frame_v1::registry::FBUILD_PAYLOAD_PROTOCOL;pub use crate::frame_v1::registry::HANDOFF_PAYLOAD_PROTOCOL;pub use crate::frame_v1::registry::PROTOCOL_VERSION;pub use crate::frame_v1::registry::SESSION_PAYLOAD_PROTOCOL;pub use crate::frame_v1::registry::ZCCACHE_PAYLOAD_PROTOCOL;pub use crate::frame_v1::encode_framed;pub use crate::frame_v1::read_frame;pub use crate::frame_v1::read_frame_with_cap;pub use crate::frame_v1::try_decode_framed;pub use crate::frame_v1::write_frame;pub use crate::frame_v1::DecodedFramed;pub use crate::frame_v1::FramingError;pub use crate::frame_v1::ENVELOPE_VERSION;pub use crate::frame_v1::FRAME_HEADER_BYTES;pub use crate::frame_v1::MAX_FRAME_BYTES;pub use crate::frame_v1::MAX_HELLO_BYTES;pub use validate::validate_frame_envelope;pub use validate::FrameValidationError;
Modules§
- frame_
ext - Compatibility path for the canonical buffer-level v1 codec.
- framing
- Compatibility path for the canonical stream-level v1 framing helpers.
- hello_
reply - Nested message and enum types in
HelloReply. - registry
- Compatibility path for the canonical v1 payload-protocol registry.
- 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
Enums§
- Admin
Reply Kind - Admin
Verb - Broker
Isolation - Cache
Root Kind - Endpoint
Name Error - Errors from the broker v1
broker::v1::Endpointsmart constructors. - Error
Code - Event
Kind - Frame
Kind - Operation
Kind - Payload
Encoding - Storage
Disposition - Teardown
Kind