Skip to main content

Module schema

Module schema 

Source
Expand description

Descriptor source for +json termination.

The proxy is schema-agnostic for binary +proto (it forwards opaque bytes), but turning +json into the binary protobuf an upstream expects needs the message descriptors. Schema resolves a Transcoder for a method path from one of three sources; the binary path never touches it.

Reflection is loaded eagerly and whole: on startup the proxy enumerates every service the upstream exposes and builds a single transcoder covering all of them, then refreshes it on a TTL (and on an operator-forced Schema::reload). One consistent snapshot, rather than resolving each method lazily.

Structs§

Schema
Resolves a Transcoder for a gRPC method path according to a SchemaSource. Cheap to clone; the reflection snapshot is shared.

Enums§

SchemaSource
Where the proxy gets the descriptors it needs to transcode +json.