Commit Graph
332 Commits
Author SHA1 Message Date
Dmitry ShuranovandGitHub 372da52e96 feat: Add metadata to error responses (#348) 2020-05-10 11:46:45 -04:00
KitsuandGitHub 8cd6f05064 fix(build): Make generated server service public (#347) 2020-05-08 10:16:52 -04:00
Lucio FrancoandGitHub 59ce1d2590 chore: Prepare 0.2.1 release (#346) 2020-05-07 15:46:45 -04:00
Lucio FrancoandGitHub e683ffef1f fix: base64 encode details header (#345) 2020-05-07 15:31:26 -04:00
Spencer JudgeandGitHub 68d2ab3339 Add some info about concurrent usage to client mod (#328) 2020-05-05 13:27:53 -04:00
Johan ThomsenandGitHub 99fbe22e7c fix(transport): Apply tls-connector for discovery when applicable (#334) (#338) 2020-05-05 13:19:04 -04:00
Johan AnderssonandGitHub 59c4555f54 chore: Upgrade cargo-deny-action v0 -> v1 (#336) 2020-05-04 12:16:26 -04:00
thisKaiandGitHub f6ecaff0de chore(example): Autoreloading server example (#316)
* Create an example of an autoreloading server

* Document the autoreloading server example

* Format autoreloading server example

* Add note about cargo-watch in the examples readme
2020-04-09 17:55:53 -04:00
d2ad8df629 feat(transport): Add AsRef impl for Certificate (#326)
Co-authored-by: IvanV <[email protected]>
2020-04-09 13:41:54 -04:00
Yonathan RandolphandGitHub 5d56daa721 fix(build): Remove ambiguity in service method call (#327)
When calling methods on Arc<MyService> where the method is also defined on Arc (e.g. drop and clone), calling inner.#method_ident(request) will actually attempt to call the Arc method instead of the method on the service, resulting in a compile error. This change removes the ambiguity by dereferencing the inner Arc.
2020-04-09 13:40:26 -04:00
Lucio FrancoandGitHub 70b345fc98 Update LICENSE 2020-04-09 10:53:33 -04:00
Lucio Franco 9ebc6f6667 chore: Add tonic-health readme`
Signed-off-by: Lucio Franco <[email protected]>
2020-04-01 14:45:05 -04:00
Lucio FrancoandGitHub 6f378e2bd0 chore: Prepare 0.2 release (#321)
Signed-off-by: Lucio Franco <[email protected]>
2020-04-01 14:34:51 -04:00
Spencer JudgeandGitHub b7860cc734 chore: Update blocking example drop order (#313) 2020-04-01 14:01:38 -04:00
Lucio FrancoandGitHub 04a8c0c82a fix(transport): Handle tls accepting on task (#320)
Signed-off-by: Lucio Franco <[email protected]>
2020-04-01 13:02:19 -04:00
Lucio FrancoandGitHub e5b1f8a172 chore: Rename internal uuid crate (#319)
Signed-off-by: Lucio Franco <[email protected]>
2020-04-01 12:35:11 -04:00
Lucio FrancoandGitHub 202093c317 feat(build): Add support for custom prost config (#318)
Signed-off-by: Lucio Franco <[email protected]>
2020-04-01 11:58:53 -04:00
Lucio FrancoandGitHub 555323630a chore: Update tokio-util 0.3 (#315)
Signed-off-by: Lucio Franco <[email protected]>
2020-03-31 15:06:52 -04:00
James NugentandGitHub 6dbe88d445 fix(build): Implement Debug for client struct
Fixes #298.
2020-03-30 17:06:31 -05:00
Lucio FrancoandGitHub 3cba9f5f6f chore: Fix feature flags and build docs (#311)
Signed-off-by: Lucio Franco <[email protected]>
2020-03-30 12:02:10 -04:00
James NugentandGitHub 59c7788846 fix(health): Set referenced version of tonic 2020-03-30 09:47:04 -05:00
James NugentandGitHub da92dbf8aa feat(health): Add tonic-health server impl
This commit adds a new crate `tonic-health` which implements the
[standard GRPC Health Checking][checking] protocol.

Currently there is only a server implementation, though others have
alluded in the discussion in #135 that client implementations exist
which could also be imported as necessary.

A example server has also been added - once the client work is done a
client for this should be added also.

[checking]: https://github.com/grpc/grpc/blob/master/doc/health-checking.md

Fixes #135.
2020-03-30 09:33:02 -05:00
Johan AnderssonandGitHub 25569e007b chore(transport): Upgrade rustls and base64 (#251) 2020-03-30 10:01:48 -04:00
CameronandGitHub cfd59dbb34 feat: Add Status with Details Constructor (#308) 2020-03-30 10:01:01 -04:00
Lucio FrancoandGitHub 2e082f8b3e chore(build): Refactor codegen traits (#302)
Signed-off-by: Lucio Franco <[email protected]>
2020-03-29 12:57:11 -04:00
Michael-J-WardandGitHub 012fa3cb4a feat(transport): Expose http2 keep-alive support (#307) 2020-03-29 12:48:43 -04:00
Coenen BenjaminandGitHub 5758b758b2 fix(build): Server service uses generic body bound (#306)
Signed-off-by: Benjamin Coenen <[email protected]>
2020-03-28 12:52:10 -04:00
Juan AlvarezandGitHub e2c2be2f08 fix(build): Remove debug println! (#287) 2020-03-27 10:58:10 -04:00
James NugentandGitHub 224280dfff fix(build): Allow non_camel_case_types on codegen structs
This commit adjusts the code generation for the internal structs in the
implementation of Service<http::Request<HyperBody>> for *Server<T> in
order to annotate internal structs whose names are derived from gRPC
method names with `[allow(non_camel_case_types)]`. This supresses
compiler warnings about type names when compiling generated code. The
struct names are not exposed externally, so this has no impact on types
seen by library consumers.

Fixes #295.
2020-03-19 14:18:34 -05:00
James NugentandGitHub 61e0429ae8 fix(metadata): Remove deprecated error description
Rust 1.42 deprecates the `description()` method of `std::error::Error`
and provides a blanket implementation suggesting implementation of
`std::fmt::Display` instead. We already implemented `Display` for error
types but in terms of the deprecated `description`. This commit
implements `Display` directly and falls back to the blanket
implementation of `description()`.
2020-03-19 14:07:25 -05:00
Andrew ChinandGitHub 414a8978b8 chore: typo ruslts -> rustls (#294) 2020-03-18 18:16:02 -04:00
9e7d35a2d3 chore: Add blocknig server example (#277)
Co-authored-by: Lucio Franco <[email protected]>
2020-03-06 11:30:10 -05:00
Lucio FrancoandGitHub 7dfa2a277b fix(build): Ignore non .rs files with rustfmt (#284)
Fixes #283
2020-03-05 15:21:02 -05:00
Gyusun YeomandGitHub f65cda1ea0 feat(build): Decouple codgen from prost (#170) 2020-03-01 13:52:31 -05:00
Danny HuaandGitHub 1b3d107206 fix(build): Don't replace extern_paths (#261)
* don't replace extern_path'd paths

tonic-build will replace all paths except for google well known types
with one rooted at the super module. For paths that have already been
replaced with a fully qualified path via the extern_path config option,
(e.g. "::uuid::Uuid"), this results in an invalid path
(e.g. "super::::uuid::Uuid"), and a build failure. These paths should
also be excluded when prefixing relative modules with super.

* add doc in tonic-build clarifying extern_path

extern_path expects fully qualified proto and rust paths

* add test cast case for extern path fix

add a test that extern path does indeed result in service types using
the specified type from an external crate. we test this by creating a
service type that has a proto from a different crate, and asserting that
it does indeed impl a trait from that crate

* add license/publish to extern_path test crates
2020-02-18 09:56:32 -05:00
Lucio FrancoandGitHub e2bff8f13e chore(docs): Add warp + tonic example (#268)
Signed-off-by: Lucio Franco <[email protected]>
2020-02-16 15:13:22 -05:00
Lucio FrancoandGitHub b49ad9bb47 chore(docs): Add hyper example (#267)
Signed-off-by: Lucio Franco <[email protected]>
2020-02-16 12:46:55 -05:00
Erich GublerandGitHub 4f343eb980 chore: upgrade percent-encoding 1.0.1 -> 2.0 (#262) 2020-02-13 11:36:39 -05:00
DizansandGitHub 34865a9fb5 chore(docs): Remove unecessary pinning (#263) 2020-02-13 11:34:34 -05:00
Johan AnderssonandLucio Franco 3e63e05666 Fix 0.1.1 diff link in changelog (#247) 2020-01-20 13:53:09 -05:00
Lucio FrancoandGitHub 66ac4c4049 chore: Prepare 0.1.1 release (#246)
* chore: Prepare 0.1.1 release

* add missing pr
2020-01-20 11:53:45 -05:00
michael-a-cliqzandLucio Franco cfdf0aff54 fix(transport): Add Connected impl for TcpStream (#245) 2020-01-20 11:29:12 -05:00
Lucio FrancoandGitHub 6de0b4d26f fix(transport): Use Uri host if no domain for tls (#244)
* fix(transport): Use Uri host if no domain for tls

* Fix warnings
2020-01-20 11:21:44 -05:00
Spencer JudgeandLucio Franco 5fc6762435 fix(build): Typo with client mod docstring (#237) 2020-01-14 13:25:17 -05:00
Fuyang LiuandLucio Franco bd0f5edddf chore: Add grpcurl example in helloworld readme (#236) 2020-01-14 10:55:59 -05:00
Lucio FrancoandGitHub f4ecf47428 chore: Prepare 0.1.0 release (#234) 2020-01-14 09:36:19 -05:00
Juan AlvarezandLucio Franco 6ee2ed9b4f chore: rename ServiceName -> NamedService (#233)
BREAKING CHANGE: Rename `ServiceName` to `NamedService`.
2020-01-13 21:41:24 -05:00
Lucio FrancoandGitHub eba7ec7b32 feat: Add gRPC interceptors (#232)
This change introduces proper gRPC interceptors that are avilable
regardless of the transport used. Each codegen service now produces an
additional method called `with_interceptor` that accepts a
`Interceptor`.

All examples have been updated to use this new style and interop has a
custom `tower::Service` middleware to echo the headers. There is also a
new `interceptor` example that shows basic usage.

BREAKING CHANGE: removed `interceptor_fn` and `intercep_headers_fn` from `transport` in favor of using `tonic::Interceptor`.
2020-01-13 21:26:08 -05:00
Juan AlvarezandLucio Franco 0fa2bf1cea feat(codec): Introduce Decoder/Encoder traits (#208)
BREAKING CHANGE: Add new `Decoder/Encoder` traits and use `EncodeBuf/DecodeBuf` over `BytesMut` directly.
2020-01-13 11:59:19 -05:00
Juan AlvarezandLucio Franco a41f55ab9d fix(build): Remove default impl for Server traits (#229)
BREAKING CHANGE: remove default implementations for server traits.
2020-01-13 09:42:14 -05:00