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
4 changes: 3 additions & 1 deletion examples/src/grpc-gcp/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let tls = RustlsChannelCredendials::new(ClientTlsConfig::new())?;
let channel_creds = CompositeChannelCredentials::new(tls, Arc::new(call_creds));

let channel = Channel::new(ENDPOINT, Arc::new(channel_creds), Default::default());
let channel = Channel::builder(ENDPOINT)
.credentials(Arc::new(channel_creds))
.build();

let client = PublisherClient::new(channel);

Expand Down
9 changes: 3 additions & 6 deletions examples/src/grpc-helloworld/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::sync::Arc;
use generated::helloworld::HelloRequest;
use generated::helloworld::greeter_client::GreeterClient;
use grpc::client::Channel;
use grpc::client::ChannelOptions;
use grpc::credentials::LocalChannelCredentials;
use protobuf::proto;

Expand All @@ -25,11 +24,9 @@ async fn main() {
};

// Create a new gRPC channel:
let channel = Channel::new(
"dns:///[::1]:50051",
Arc::new(LocalChannelCredentials::new()),
ChannelOptions::default(),
);
let channel = Channel::builder("dns:///[::1]:50051")
.credentials(Arc::new(LocalChannelCredentials::new()))
.build();
let client = GreeterClient::new(channel);

// Send the request and print the response:
Expand Down
10 changes: 4 additions & 6 deletions examples/src/grpc-routeguide/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::env;
use std::sync::Arc;

use grpc::client::Channel;
use grpc::client::ChannelOptions;
use grpc::client::Invoke;
use grpc::credentials::LocalChannelCredentials;
use tokio::task;
Expand Down Expand Up @@ -180,11 +179,10 @@ async fn main() {
println!("Connecting to {address}...");

// Create a new gRPC channel:
let channel = Channel::new(
format!("dns:///{address}"),
Arc::new(LocalChannelCredentials::new()),
ChannelOptions::default(),
);
let channel = Channel::builder(format!("dns:///{address}"))
.credentials(Arc::new(LocalChannelCredentials::new()))
.build();

let client = RouteGuideClient::new(channel);

println!("*** SIMPLE RPC ***");
Expand Down
4 changes: 2 additions & 2 deletions grpc-protobuf-build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "grpc-protobuf-build"
version = "0.9.0"
version = "0.10.0"
authors = ["gRPC Authors"]
license = "MIT"
homepage = "https://grpc.io"
Expand All @@ -20,7 +20,7 @@ prettyplease = "0.2.35"
protobuf-codegen = { version = "4.34.0-release" }
syn = "2.0.104"
which = "8.0"
protoc-gen-rust-grpc = { version = "0.9.0", path = "../protoc-gen-rust-grpc", optional = true }
protoc-gen-rust-grpc = { version = "0.10.0", path = "../protoc-gen-rust-grpc", optional = true }

[features]
default = ["build-plugin"]
Expand Down
4 changes: 2 additions & 2 deletions grpc-protobuf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "grpc-protobuf"
version = "0.9.0"
version = "0.10.0"
authors = ["gRPC Authors"]
license = "MIT"
homepage = "https://grpc.io"
Expand All @@ -22,7 +22,7 @@ allowed_external_types = [

[dependencies]
bytes = "1.11.1"
grpc = { version = "0.9.0", path = "../grpc" }
grpc = { version = "0.10.0", path = "../grpc" }
protobuf = "4.34.0-release"

[dev-dependencies]
2 changes: 1 addition & 1 deletion grpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "grpc"
version = "0.9.0"
version = "0.10.0"
authors = ["gRPC Authors"]
license = "MIT"
homepage = "https://grpc.io"
Expand Down
Loading
Loading