Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grpc-xds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ allowed_external_types = []
protobuf = "4.35.1-release"
protobuf-well-known-types = "4.35.1-release"
bytes = "1.11.0"
xds-client = { version = "0.1.0-alpha.2", path = "../xds-client", default-features = false }
xds-client = { version = "0.1.0-alpha.3", path = "../xds-client", default-features = false }
regex = "1"

[build-dependencies]
Expand Down
9 changes: 5 additions & 4 deletions tonic-xds/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tonic-xds"
version = "0.1.0-alpha.2"
version = "0.1.0-alpha.3"
edition = "2024"
rust-version.workspace = true
homepage = "https://github.com/hyperium/tonic"
Expand Down Expand Up @@ -33,7 +33,7 @@ url = "2.5.8"
futures-core = "0.3.31"
futures-util = "0.3"
bytes = "1"
xds-client = { version = "0.1.0-alpha.2", path = "../xds-client" }
xds-client = { version = "0.1.0-alpha.3", path = "../xds-client" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
envoy-types = "0.7"
Expand All @@ -56,13 +56,13 @@ rustls = { version = "0.23", default-features = false, features = ["std", "tls12
rustls-pemfile = { version = "2", optional = true }
x509-parser = { version = "0.17", optional = true }
opentelemetry = { version = "0.32", optional = true, default-features = false, features = ["metrics"] }
xds-client-opentelemetry = { version = "0.1.0-alpha.2", path = "../xds-client-opentelemetry", optional = true }
xds-client-opentelemetry = { version = "0.1.0-alpha.3", path = "../xds-client-opentelemetry", optional = true }

[lints]
workspace = true

[dev-dependencies]
xds-client = { version = "0.1.0-alpha.2", path = "../xds-client", features = ["test-util"] }
xds-client = { version = "0.1.0-alpha.3", path = "../xds-client", features = ["test-util"] }
xds-test-util = { path = "../xds-test-util" }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "test-util"] }
tonic = { version = "0.14", features = [ "server", "channel", "tls-ring" ] }
Expand Down Expand Up @@ -123,5 +123,6 @@ allowed_external_types = [
"tower::util::boxed_clone_sync::BoxCloneSyncService",
"url::parser::ParseError",
"serde_core::de::Deserialize",
"serde_core::ser::Serialize",
"serde_json::error::Error",
]
27 changes: 25 additions & 2 deletions tonic-xds/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
//!
//! | Method | How |
//! |--------|-----|
//! | Programmatic | [`BootstrapConfig::from_json`] then [`XdsChannelConfig::with_bootstrap`] |
//! | Programmatic (builder) | [`BootstrapConfig::builder`] then [`XdsChannelConfig::with_bootstrap`] |
//! | Programmatic (JSON) | [`BootstrapConfig::from_json`] then [`XdsChannelConfig::with_bootstrap`] |
//! | Environment (explicit) | [`XdsChannelConfig::with_bootstrap_from_env`] |
//! | Environment (implicit) | Omit bootstrap; the builder loads from env vars automatically |
//!
Expand Down Expand Up @@ -105,6 +106,26 @@
//! // let client = MyServiceClient::new(channel);
//! ```
//!
//! ### Using the builder
//!
//! ```rust,no_run
//! use tonic_xds::{BootstrapConfig, ChannelCredentialType, XdsChannelBuilder, XdsChannelConfig, XdsUri};
//!
//! let bootstrap = BootstrapConfig::builder("xds.example.com:443")
//! .channel_creds([ChannelCredentialType::Tls])
//! .node_id("my-node")
//! .node_cluster("my-cluster")
//! .build()
//! .unwrap();
//!
//! let target = XdsUri::parse("xds:///myservice:50051").unwrap();
//! let channel = XdsChannelBuilder::new(
//! XdsChannelConfig::new(target).with_bootstrap(bootstrap),
//! ).build_grpc_channel().unwrap();
//!
//! // let client = MyServiceClient::new(channel);
//! ```
//!
//! ## TLS Security (gRFC A29)
//!
//! Upstream data-plane TLS is enabled when:
Expand Down Expand Up @@ -182,7 +203,9 @@ pub use client::retry::{
pub use client::route::PreRouteInterceptor;
pub use common::async_util::BoxFuture;
pub use shared_http_body::SharedBody;
pub use xds::bootstrap::{BootstrapConfig, BootstrapError};
pub use xds::bootstrap::{
BootstrapConfig, BootstrapConfigBuilder, BootstrapError, ChannelCredentialType,
};
pub use xds::resource::route_config::{RouteConfigMetadata, TypedMetadata};
pub use xds::uri::{XdsUri, XdsUriError};
pub use xds_client::TonicCallCredentials;
Expand Down
Loading
Loading