Skip to main content

Module frame_v1

Module frame_v1 

Source
Expand description

Frozen v1 Frame envelope codec and consumer-protocol registry.

This direct, transport-free surface is available without broker IPC, daemon identity, hashing, or an async runtime. Broad broker paths re-export these exact items for compatibility. Frozen v1 Frame envelope primitives.

This is the smallest running-process surface for a daemon that already owns its endpoint and its application payload. It contains only the wire envelope, incremental and stream codecs, and payload-protocol registration checks. It deliberately does not select an IPC transport, hash a daemon image, parse configuration, or start a runtime.

The exact wire layout is [u8 framing_version=1][u32 LE body_length][prost Frame]. These values are frozen for v1; broad broker paths re-export the literal same items from this module for source and type compatibility.

Re-exports§

pub use registry::ADMIN_PAYLOAD_PROTOCOL;
pub use registry::BACKEND_HANDLE_PROBE_PAYLOAD_PROTOCOL;
pub use registry::CLUD_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::SESSION_PAYLOAD_PROTOCOL;
pub use registry::ZCCACHE_PAYLOAD_PROTOCOL;

Modules§

registry
Frozen v1 payload-protocol registry and consumer registration checks.

Structs§

DecodedFramed
One Frame decoded from the front of a byte buffer.
Frame
Every control-plane frame on a broker connection.

Enums§

FrameKind
FramingError
Errors produced while reading, writing, or incrementally decoding a v1 Frame envelope.
PayloadEncoding

Constants§

ENVELOPE_VERSION
Framing byte for v1. Alias of FRAMING_VERSION_V1.
FRAME_HEADER_BYTES
Length of the outer wire header: [u8 framing_version][u32 LE body_len].
FRAMING_VERSION_V1
Framing byte for every v1 broker Frame.
MAX_FRAME_BYTES
Default per-frame size cap (16 MiB). Alias of MAX_FRAME_SIZE_BYTES.
MAX_FRAME_SIZE_BYTES
Hard ceiling on one v1 frame body.
MAX_HELLO_BYTES
Hello-envelope size cap (64 KiB). Alias of MAX_HELLO_SIZE_BYTES.
MAX_HELLO_SIZE_BYTES
Hard ceiling on the initial v1 Hello envelope.

Functions§

encode_framed
Encode one Frame into complete v1 wire bytes.
read_frame
Read one v1 frame body with the default 16 MiB cap.
read_frame_with_cap
Read one v1 frame body, rejecting an announced size greater than max_bytes before allocating.
try_decode_framed
Incrementally decode one Frame from the front of buf.
write_frame
Write one v1 frame body, flush the stream, and return the byte count.