Commit Graph
385 Commits
Author SHA1 Message Date
tottotoandGitHub 5bcebaf3ca chore: Update to rustls 0.21 (#1340) 2023-04-03 13:30:18 +00:00
Lucio FrancoandGitHub 3a497f2ca2 chore: Prepare v0.9.0 release (#1337) 2023-03-31 18:41:53 +00:00
YiiShandGitHub b54ce2321a feat(transport): Addlocal_addr to Request o (#1327) 2023-03-31 17:09:50 +00:00
Lucio FrancoandGitHub ff331199e4 feat(core): Default encoding/decoding limits (#1335)
* feat(core): Default encoding/decoding limits

This PR adds new defaults for both client and server max
encoding/decoding message size limits. By default, the max message
decoding size is `4MB` and the max message encoding size is
`usize::MAX`.

This is follow up work from https://github.com/hyperium/tonic/pull/1274

BREAKING: Default max message encoding/decoding limits

* update generated code
2023-03-30 16:59:08 +00:00
Lucio FrancoandGitHub c8027a1385 fix(codec): Cancelled client streaming handling (#1315)
This PR fixes how client side streaming is handled on the server side
and improves overall source error matching.

Fixes:

- Correctly, detect h2 codes when its wrapped in a hyper error.
- Cancelled requests from the client side during client streaming
  requests correctly return EOF (`None` from `Streaming::message()`)

Closes #848
2023-03-14 15:18:56 +00:00
tottotoandGitHub 99eae577ca chore(tonic): Remove redundant reference to reference (#1309) 2023-03-13 14:28:18 +00:00
tottotoandGitHub 838d91aca3 chore: Update to tower-http 0.4 (#1296)
* chore: Update to tower-http 0.4

* chore(tonic): Update to axum 0.6.9
2023-02-27 14:33:14 +00:00
7a6b20d8ef feat: add GrpcMethod extension into request for client (#1275)
* feat: add GrpcMethod extension into request for client

* refactor: change GrpcMethod fields into private and expose methods instead

* refactor: hide GrpcMethod::new in doc

---------

Co-authored-by: Lucio Franco <[email protected]>
2023-02-23 10:06:45 +00:00
3a38a32a02 chore(tonic): Use BoxBody type alias (#1284)
Co-authored-by: Lucio Franco <[email protected]>
2023-02-21 17:03:42 +00:00
tottotoandGitHub 79d0e3faf5 chore(tonic): Remove duplicate tls feature gate and re-export http crate instead of using wildcard importing (#1281)
* chore(tonic): Remove duplicate tls feature gate

* chore(tonic): Re export http crate instead of using wildcard importing
2023-02-21 15:50:53 +00:00
Moncef AOUDIAandGitHub 9f716d8411 feat(codec): Configure max request message size (#1274)
* feat(codec): add max_message_size parameter

resolves #1097

* refactor(client): add max size parameters

* refactor(tonic-build): update server gen template

* refactor(tonic-build): update client template

* fix(tonic-build): update client template

* fix(tonic-build): small typo in server.rs

* fix(tonic-build): client.rs generator

* fix(tonic): add apply max message setting size to server

* fix(test): wrong message size

* fix: doctest + generated rs
2023-02-17 15:58:22 +00:00
773e4e1749 feat(tls): add an option for optional TLS client authentication (#1163)
* feat(tls): add an option for optional TLS client authentication

Previously there were only two options for client authentication –
either no authentication or mandatory authentication. With this change,
a server can allow for optional authentication with a given root CA
certificate and enforce client authentication on a per-request basis.

Refs: #687

* Update tonic/src/transport/server/tls.rs

---------

Co-authored-by: Lucio Franco <[email protected]>
2023-02-16 20:14:15 +00:00
tottotoandGitHub 5acde56176 feat(tonic): Use NamedService without transport feature (#1273) 2023-02-15 14:47:28 +00:00
tottotoandGitHub 7d6561cf3b chore(tonic): Change async-stream optional (#1271) 2023-02-15 14:46:41 +00:00
tottotoandGitHub d9a8f10324 chore(tonic): Remove duplicated code (#1267) 2023-02-14 14:47:11 +00:00
Velichko AntonandGitHub aa69a023f7 Expose Response#into_parts and Response#from_parts (#1263)
* chore: change the default visibility from pub(crate) to pub for from_parts and into_parts pair.

* chore: add docs for the Response#into_parts and Response#from_parts
2023-02-13 18:54:37 +00:00
7c0e9c853c Make some functionality of Status public (#1256)
* Make some functionality of Status public

Signed-off-by: Nick Cameron <[email protected]>

* Update tonic/src/status.rs

---------

Signed-off-by: Nick Cameron <[email protected]>
Co-authored-by: Lucio Franco <[email protected]>
2023-02-13 15:29:19 +00:00
山岚andGitHub 17d6a4b576 feat(transport): added support for EC keys (#1145)
* tonic: allow TLS to read ECKeys.

Fixes: #1143
Signed-off-by: Yu Juncen <[email protected]>

* tonic: minimize the scope of published function.

Signed-off-by: Yu Juncen <[email protected]>

---------

Signed-off-by: Yu Juncen <[email protected]>
2023-02-13 15:16:21 +00:00
Andrew HickmanandGitHub 930c805127 fix: MetadataKey::from_bytes returns an error (#1246)
BREAKING: `Metadata::from_bytes` returns an error now
2023-02-08 09:09:29 -05:00
tottotoandGitHub 0ac0ce8ce7 chore: Remove unused dependencies (#1244) 2023-02-04 05:12:17 -05:00
tottotoandGitHub e2b1e60276 chore(tonic): Remove outdated allow dead code lint annotation (#1230) 2023-01-11 13:26:01 -05:00
tottotoandGitHub ee6ccfbcc2 chore: Update to base64 0.21 (#1228) 2023-01-11 11:25:38 -05:00
tottotoandGitHub 8828e0340c chore(tonic): Remove redundant tls feature gate (#1226) 2023-01-10 16:02:40 -05:00
tottotoandGitHub 0d35d7fbaf chore(tonic): Remove outdated allow lint (#1222) 2023-01-09 12:49:31 -05:00
Thom WrightandGitHub 0ca0630993 tonic: set a conn timeout for balanced connections (#1215)
The `endpoint` supplied has a connection_timeout parameter which was
being ignored in this case.
2023-01-06 15:39:18 -05:00
tottotoandGitHub 2d7e14f513 chore: Fix doc warning (#1214)
* chore(docs): Fix lint warning

* chore: Add ci to check cargo doc
2023-01-04 14:20:24 -05:00
tottotoandGitHub a72cf04b44 chore: Remove unused tracing-futures from dependencies (#1208) 2022-12-20 16:13:46 -05:00
tottotoandGitHub bf22a740c3 chore: Update to 2021 edition (#1188) 2022-12-13 15:16:49 -05:00
Jan TeskeandGitHub 25ea473abd tonic-build: use unified syntax to clone Arcs (#1182) 2022-12-13 13:22:54 -05:00
tottotoandGitHub 35c4946d35 chore: Use namespaced dependency feature (#1187) 2022-12-13 13:06:20 -05:00
tottotoandGitHub 2dd09c02bd chore: Fix clippy lint (#1181) 2022-12-13 11:29:29 -05:00
Lucio FrancoandGitHub dc079c12bf chore: Prepare v0.8.3 release (#1164) 2022-11-28 13:35:48 -05:00
Joan Antoni REandGitHub b53b387ced Fix some struct references on transport channel doc (#1152) 2022-11-28 12:27:50 -05:00
David PedersenandGitHub 542c5b37dc chore: update to axum 0.6.0 (#1155) 2022-11-28 10:40:46 -05:00
Marco NeumannandGitHub 33e22bbc5e fix: do not panic while encoding oversized bodies (#1142)
Fixes #1141.
2022-11-10 11:07:35 -05:00
Lucio FrancoandGitHub 6667ace032 Update minimal version of pin-project (#1132) 2022-11-01 12:53:18 -04:00
Francesco GuardianiandGitHub b409ddd478 feat: Expose Request#into_parts and Request#from_parts (#1118)
Signed-off-by: slinkydeveloper <[email protected]>
2022-10-19 10:25:21 -04:00
Will-LowandGitHub be1fe02e6e chore: bumping dependency axum to version 0.5.16 (#1110) 2022-10-15 10:18:19 -04:00
walterandGitHub 0b03b30ccc feat(transport): add from_listener for TcpIncoming (#1093) 2022-10-03 07:08:43 -04:00
Lucio FrancoandGitHub a7e29c9213 chore: Prepare 0.8.2 release (#1089) 2022-09-28 10:56:22 -04:00
Lucio FrancoandGitHub cddd992666 fix(transport): Bump axum for CVE-2022-3212 (#1088) 2022-09-28 10:27:58 -04:00
56ff45d9a3 feat: add Result<T> type alias for std::result::Result<T, tonic::Status> (#1085)
* add `Result<T>` type alias for `std::result::Result<T, tonic::Status>`

* Allow user to override the error type

Co-authored-by: David Pedersen <[email protected]>

* add rustdoc for `tonic::Result`

* cargo fmt

Co-authored-by: David Pedersen <[email protected]>
2022-09-26 12:24:33 -04:00
David PedersenandGitHub ee3d0dfe75 feat(tonic): impl Clone for Status using Arc (#1076) 2022-09-12 11:31:30 -04:00
Lucio FrancoandGitHub 5723681777 chore: Prepare 0.8.1 release (#1072) 2022-09-07 10:33:19 -04:00
919d28b2b9 feat(transport): Expose hyper's H2 adaptive window on server (#1071)
Co-authored-by: Adam Chalmers <[email protected]>
2022-09-06 14:37:20 -04:00
Joe DahlquistandGitHub 2a83f8ba1a expose Extensions::into_http and Status::from_error (#1067) 2022-08-24 16:04:26 -04:00
Markus WesterlindandGitHub 523a55044f chore: Reduce how much code gets monomorphized (#1032) 2022-08-23 14:29:15 -04:00
9be4e2479d chore: Update docs to reflect changes to compression feature (#1046)
Co-authored-by: Lucio Franco <[email protected]>
2022-08-02 09:38:08 -07:00
Lucio Franco ec359ba35f chore: Prepare 0.8 release (#1044) 2022-07-29 16:45:57 -04:00
Alan LawrenceandGitHub 2a7c610011 Make TcpIncoming public (#1037) 2022-07-29 14:31:53 -04:00