Skip to content

Commit 750bcce

Browse files
authored
Merge branch 'master' into rename-interceptor-call-method-to-intercept
2 parents 6b3880c + 3009cf5 commit 750bcce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+203
-194
lines changed

examples/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ tonic-types = { path = "../tonic-types", optional = true }
300300
async-stream = { version = "0.3", optional = true }
301301
tokio-stream = { version = "0.1", optional = true }
302302
tokio-util = { version = "0.7.8", optional = true }
303-
tower = { version = "0.4", optional = true }
303+
tower = { version = "0.5", optional = true }
304304
rand = { version = "0.8", optional = true }
305305
serde = { version = "1.0", features = ["derive"], optional = true }
306306
serde_json = { version = "1.0", optional = true }
@@ -318,7 +318,7 @@ h2 = { version = "0.4", optional = true }
318318
tokio-rustls = { version = "0.26", optional = true, features = ["ring", "tls12"], default-features = false }
319319
hyper-rustls = { version = "0.27.0", features = ["http2", "ring", "tls12"], optional = true, default-features = false }
320320
rustls-pemfile = { version = "2.0.0", optional = true }
321-
tower-http = { version = "0.5", optional = true }
321+
tower-http = { version = "0.6", optional = true }
322322
pin-project = { version = "1.0.11", optional = true }
323323

324324
[build-dependencies]

examples/helloworld-tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ name = "helloworld-client"
112112
path = "src/client.rs"
113113

114114
[dependencies]
115-
tonic = "0.12"
115+
tonic = "0.13"
116116
prost = "0.13"
117117
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
118118

119119
[build-dependencies]
120-
tonic-build = "0.12"
120+
tonic-build = "0.13"
121121
```
122122

123123
We include `tonic-build` as a useful way to incorporate the generation of our client and server gRPC code into the build process of our application. We will setup this build process now:

examples/routeguide-tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Edit `Cargo.toml` and add all the dependencies we'll need for this example:
174174

175175
```toml
176176
[dependencies]
177-
tonic = "0.12"
177+
tonic = "0.13"
178178
prost = "0.13"
179179
tokio = { version = "1.0", features = ["rt-multi-thread", "macros", "sync", "time"] }
180180
tokio-stream = "0.1"
@@ -185,7 +185,7 @@ serde_json = "1.0"
185185
rand = "0.8"
186186

187187
[build-dependencies]
188-
tonic-build = "0.12"
188+
tonic-build = "0.13"
189189
```
190190

191191
Create a `build.rs` file at the root of your crate:

examples/src/tower/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
1515

1616
let channel = ServiceBuilder::new()
1717
// Interceptors can be also be applied as middleware
18-
.layer(tonic::service::interceptor(intercept))
18+
.layer(tonic::service::InterceptorLayer::new(intercept))
1919
.layer_fn(AuthSvc::new)
2020
.service(channel);
2121

examples/src/tower/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
4747
// Apply our own middleware
4848
.layer(MyMiddlewareLayer::default())
4949
// Interceptors can be also be applied as middleware
50-
.layer(tonic::service::interceptor(intercept))
50+
.layer(tonic::service::InterceptorLayer::new(intercept))
5151
.into_inner();
5252

5353
Server::builder()

interop/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ prost = "0.13"
2626
tokio = {version = "1.0", features = ["rt-multi-thread", "time", "macros"]}
2727
tokio-stream = "0.1"
2828
tonic = {path = "../tonic", features = ["tls"]}
29-
tower = {version = "0.4"}
29+
tower = "0.5"
3030
tracing-subscriber = {version = "0.3"}
3131

3232
[build-dependencies]

tests/compression/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ prost = "0.13"
1919
tokio = {version = "1.0", features = ["macros", "rt-multi-thread", "net"]}
2020
tokio-stream = "0.1"
2121
tonic = {path = "../../tonic", features = ["gzip", "zstd"]}
22-
tower = {version = "0.4", features = []}
23-
tower-http = {version = "0.5", features = ["map-response-body", "map-request-body"]}
22+
tower = "0.5"
23+
tower-http = {version = "0.6", features = ["map-response-body", "map-request-body"]}
2424

2525
[build-dependencies]
2626
tonic-build = {path = "../../tonic-build" }

tests/integration_tests/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ http = "1"
2121
http-body = "1"
2222
hyper-util = "0.1"
2323
tokio-stream = {version = "0.1.5", features = ["net"]}
24-
tower = {version = "0.4", features = []}
25-
tower-http = { version = "0.5", features = ["set-header", "trace"] }
24+
tower = "0.5"
25+
tower-http = { version = "0.6", features = ["set-header", "trace"] }
2626
tower-service = "0.3"
2727
tracing = "0.1"
2828

tonic-build/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ categories = ["network-programming", "asynchronous"]
44
description = """
55
Codegen module of `tonic` gRPC implementation.
66
"""
7-
documentation = "https://docs.rs/tonic-build/0.12.3"
7+
documentation = "https://docs.rs/tonic-build/0.13.0"
88
edition = "2021"
99
homepage = "https://github.com/hyperium/tonic"
1010
keywords = ["rpc", "grpc", "async", "codegen", "protobuf"]
1111
license = "MIT"
1212
name = "tonic-build"
1313
readme = "README.md"
1414
repository = "https://github.com/hyperium/tonic"
15-
version = "0.12.3"
15+
version = "0.13.0"
1616

1717
[dependencies]
1818
prettyplease = { version = "0.2" }

tonic-build/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/website/master/public/img/icons/tonic.svg"
7171
)]
7272
#![deny(rustdoc::broken_intra_doc_links)]
73-
#![doc(html_root_url = "https://docs.rs/tonic-build/0.12.3")]
73+
#![doc(html_root_url = "https://docs.rs/tonic-build/0.13.0")]
7474
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
7575
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
7676
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

0 commit comments

Comments
 (0)