Expand description
Plain-Rust types for the QUIC per-stream metadata protocol. Plain-Rust types for the QUIC per-stream metadata protocol.
The wire format is Cap’n Proto (see quic_metadata_protocol.capnp);
encoding and decoding happen here so the libcfd crate never touches
capnp directly.
Structs§
- Connect
Request - The connection request sent by the edge on a data stream.
- Connect
Response - The connection response sent back to the edge.
Enums§
- Connection
Type - The kind of connection the edge requests on a data stream.
Constants§
- DATA_
STREAM_ PROTOCOL_ SIGNATURE - Magic bytes that identify a data (request) stream, from cloudflared’s
tunnelrpc/quic/protocol.go. - HTTP_
HEADER_ KEY - Prefix for per-header metadata entries (e.g.
HttpHeader:content-type). - HTTP_
HOST_ KEY - Metadata key carrying the HTTP request host on a data stream.
- HTTP_
METHOD_ KEY - Metadata key carrying the HTTP request method on a data stream.
- HTTP_
STATUS_ KEY - Metadata key carrying the HTTP response status on a data stream.
- PROTOCOL_
V1 - The per-stream protocol version (“01”).
- RPC_
STREAM_ PROTOCOL_ SIGNATURE - Magic bytes that identify an edge-initiated RPC stream.
Functions§
- decode_
connect_ request_ bytes - Decodes a
ConnectRequestfrom serialized message bytes. - decode_
connect_ response_ bytes - Decodes a
ConnectResponsefrom serialized message bytes. - encode_
connect_ request - Encodes a
ConnectRequestinto a Cap’n Proto message (used by tests and the mock edge). - encode_
connect_ response - Encodes a
ConnectResponseinto a Cap’n Proto message. - read_
connect_ request - Reads a
ConnectRequestmessage from a stream. - read_
connect_ response - Reads a
ConnectResponsemessage from a stream (used by the mock edge). - write_
connect_ request - Writes a
ConnectRequestmessage to a stream (used by the mock edge). - write_
connect_ response - Writes a
ConnectResponsemessage to a stream.