#envoy #grpc #grpc-api

xds-api

Protocol buffer types for working with Envoy's xDS APIs

1 unstable release

0.1.0 Sep 5, 2024

#3 in #envoy

Download history 139/week @ 2024-09-05 86/week @ 2024-09-12 17/week @ 2024-09-19 10/week @ 2024-09-26 33/week @ 2024-10-03 54/week @ 2024-10-10 84/week @ 2024-10-17 168/week @ 2024-10-24 64/week @ 2024-10-31 45/week @ 2024-11-07 22/week @ 2024-11-14

303 downloads per month
Used in 2 crates

Apache-2.0

6.5MB
136K SLoC

xds-api

This crate contains generated Tonic bindings for the xDS gRPC protocol. You should depend on this crate if you're interested in building an xDS client or server or are working with any of Envoy's configuration types.

xDS Versions

This crate targets the v3 versions of the xDS APIs. If you are interested in v2 API support, please reach out or open an issue.

WellKnownTypes

xDS makes heavy use of the protobuf Any type. To make working with Any easier, this crate generates its own Any implementation and provides WellKnownTypes for converting between Any and known type URLs.

Feature Flags

This crate provides feature flags for:

  • pbjson: Enables Serde serialization/deserialization for xDS types using the pbjson crate, which approximates the canonical json mapping with Serde APIs. Enabling this flag adds a Serialize and Deserialize implementation to all xDS types.

  • descriptor: Generates and includes an encoded protobuf descriptor for all of the types in the xDS API. That descriptor can be registered with tonic_reflection to make the xDS APIs visible to a gRPC Reflection Service.

Protoc

Because this crate compiles well-known types on its own, it depends on a pinned version of protoc. The currently pinned version is kept in .protoc-version.

Dependencies

~4–10MB
~100K SLoC