Skip to main content

Module protocol

Module protocol 

Source
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§

AdminReply
AdminRequest
CacheManifest
CacheRoot
CleanupPolicy
DaemonProcess
Endpoint
Frame
Every control-plane frame on a broker connection.
HandoffAck
Backend -> broker acknowledgement of a HandoffOffer. Rides Frame.payload with kind = FRAME_KIND_RESPONSE and payload_protocol = 0xD0FF on the same control connection.
HandoffOffer
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.
HelloReply
HostIdentity
LifecycleEvent
ManifestRef
Negotiated
ObservabilityInfo
Operation
Ownership
Quota
Refused
ServiceDefinition
TeardownHook

Enums§

AdminReplyKind
AdminVerb
BrokerIsolation
CacheRootKind
EndpointNameError
Errors from the broker v1 broker::v1::Endpoint smart constructors.
ErrorCode
EventKind
FrameKind
OperationKind
PayloadEncoding
StorageDisposition
TeardownKind