Skip to main content

Crate gproxy_protocol

Crate gproxy_protocol 

Source
Expand description

GPROXY v4 protocol.

Two jobs, and nothing else:

  1. Model the connection. What a request and a response are on an HTTP link — five request elements, three response elements, and buffered or streaming bodies. An established WebSocket is a separate duplex link.
  2. Describe host capabilities for protocol adaptation. A host supplies upstream calls, resource access, and scoped state. Bounded codecs and identity mapping support adapters that compose these capabilities for one or more calls without depending on a full core.

Beside them, usage reads per-call metering out of an operation’s standard response, because only the standard shapes are known here.

What is deliberately absent:

  • URL path matching. Which URL serves an operation is an HTTP convention. The ingress layer owns it; an SDK caller names the operation and never sees a path.
  • Any notion of a channel. A channel is a vendor integration with credentials and auth; this crate only knows dialects.
  • A unified IR. Conversion is N-by-N pairwise on purpose. Upstream specs churn faster than any pivot format tracks, and conversion fidelity is the product. See design/transform.md.

Everything here derives from upstream_docs/, which is the source of truth for field names, semantics and examples.

Re-exports§

pub use wire::claude;
pub use wire::gemini;
pub use wire::openai;
pub use connection::HttpBody;
pub use connection::WebSocket;
pub use connection::WireRequest;
pub use connection::WireResponse;
pub use operation::Dialect;
pub use operation::Operation;
pub use operation::OperationKey;
pub use operation::WireFamily;

Modules§

adapt
Runtime-neutral composition over host-supplied capabilities.
capability
Runtime-neutral capability contracts.
codec
Bounded, runtime-neutral wire codecs.
connection
HTTP messages, body representations, and independent WebSocket connections.
operation
Operation identity: what a request is asking for, and in whose dialect.
spec
Declared wire surfaces, independent of routing and provider capabilities.
transform
Direct vendor-wire conversions and the identity rules they share.
usage
Per-call metering read from the standard response of an operation.
wire
Vendor wire dialect models.

Type Aliases§

Rest
Unknown fields preserved when a wire object is read and written unchanged.