Commit Graph
46 Commits
Author SHA1 Message Date
Juan AlvarezandLucio Franco 85ef18f8b7 fix(transport): Update builders to move self (#132) 2019-11-11 15:27:40 +01:00
James NugentandLucio Franco 79996f7c93 Allow selection of TLS library in Interop tests (#129) 2019-11-10 17:28:03 +01:00
James NugentandLucio Franco ed53be5779 Use rustls for interop tests (#125)
* Use rustls for interop tests

This commit changes the interop tests to use rustls instead of openssl.
Apparently in the past there was some issue with this, but it seems to
work OK to me.

* Use certificates with larger key sizes for interop

This commit switches out the certificates used for testing interop to be
based on 4096-bit RSA keys, allowing rustls to be used for the interop
testing instead of OpenSSL.

The keys are generated using Terraform, although the state file is not
committed. A README.md is added to the data directory that explains how
to use Terraform to rotate the test certificates if this is ever
desirable.

This is desirable in order that none of the crates which `cargo build
--all` will build have the `openssl` feature, which should allow Tonic
to build on Windows with no issues.
2019-11-09 17:00:23 +00:00
Lucio FrancoandGitHub 5c2f4dba32 feat(transport): Change channel connect to be async (#107)
This makes it so you can check if the initial connection
is established. Before this we used reconnect which would
lazily attempt to connect. So if you were trying to connect
to a non existant Server you wouldn't find out until after
you attempted your first RPC. This simplifies everything
by allowing you connect before creating the RPC client.

BREAKING CHANGE: `Endpoint::channel` was removed in favor of
an async `Endpoint::connect`.
2019-10-31 14:09:40 -04:00
Lucio FrancoandGitHub 3ce61d9860 fix(codec): Enforce encoders/decoders are Sync (#84)
Closes #81
2019-10-30 15:00:31 -04:00
Lucio FrancoandGitHub 5b4f4689a2 feat(transport): Add service multiplexing/routing (#99)
* feat(transport): Add service multiplexing/routing

This change introduces a new "router" built on top of
`transport::Server` that allows one to run multiple
gRPC services on the same socket.

```rust
Server::builder()
    .add_service(greeter)
    .add_service(echo)
    .serve(addr)
    .await?;
```

There is also a new `multiplex` example showcasing
server side service multiplexing and client side
service multiplexing.

BREAKING CHANGES: `Server::serve` is now crate private
and all services must be added via `Server::add_service`.
Codegen also returns just a `Service` now instead of a
`MakeService` pair.

Closes #29

Signed-off-by: Lucio Franco [email protected]
2019-10-29 16:32:04 -04:00
Juan AlvarezandLucio Franco 7eda823c9c fix(client): Use Stream instead of TrySteam for client calls (#61) 2019-10-10 11:39:35 -04:00
James NugentandLucio Franco 8db3961491 feat(transport): Expose more granular control of TLS configuration (#48)
This commit reworks TLS configuration of both servers and endpoints in
order to provide a more flexible API. We now add options to configure
the selected TLS library using the appropriate 'native' configuration
structures, as well as retaining the existing simplier interface which
is compatible with both.

The new API can also be easily extended to support simple interfaces for
configuring mTLS and a range of other options without creating sprawl
in the builders for `Server` and `Endpoint`.
2019-10-08 11:49:05 -04:00
Lucio Franco a9f7992585 Remove more tODO's 2019-09-29 22:38:28 -04:00
Lucio Franco a35ef96a03 Add docs to transport and refactor some api's 2019-09-29 17:04:42 -04:00
Lucio Franco 60c9629630 Refactor all of the tls 2019-09-24 14:32:16 -04:00
Lucio Franco 782da6f0e5 implement last interop test 2019-09-21 16:02:10 -06:00
Lucio Franco df8e0a0a97 fmt 2019-09-21 10:23:46 -06:00
Lucio Franco 62f0285ff0 implemented server cusotm metadata 2019-09-21 10:23:31 -06:00
Lucio Franco e419c18304 Add basic interceptor support 2019-09-18 23:16:48 -04:00
Lucio Franco 9954b9e10c Update tracing in interop test 2019-09-16 18:40:43 -04:00
Lucio Franco d6f4d49e2e Add layers 2019-09-16 18:27:54 -04:00
Lucio Franco 22bb41b7c9 add tracing to interop server 2019-09-12 14:40:01 -04:00
Lucio Franco 7ab2f12231 Add half duplex as an unimplemented call 2019-09-11 22:53:12 -04:00
Lucio Franco 306d169c91 Add unimplemented interop test 2019-09-11 22:44:59 -04:00
Lucio Franco fd1029f967 More interop test clean up 2019-09-08 16:50:39 -04:00
Lucio Franco fe65d9789f Fix server streaming inital error response headers 2019-09-08 16:41:16 -04:00
Lucio Franco f74bba6858 Add server interop tests 2019-09-06 21:40:59 -04:00
Lucio Franco 8b548f2ea4 Nest server and client in their own mods 2019-09-06 17:52:41 -04:00
Lucio Franco 9d44b02e1a Clean up interop server and fmt 2019-09-06 15:56:26 -04:00
Lucio Franco edf700b114 Pin nightly again 2019-09-06 15:50:59 -04:00
Lucio Franco ec5778dfa1 Update interop server 2019-09-06 15:37:08 -04:00
Lucio Franco b1cf35e35d Add server and basic server side tls 2019-09-02 23:02:02 -04:00
Lucio Franco b1991b312f fmt 2019-09-02 18:25:55 -04:00
Lucio Franco 6d09f4de25 Add use_tls option for interop tests 2019-09-02 18:20:22 -04:00
Lucio Franco affd148525 Rename project and fmt 2019-09-01 13:09:39 -04:00
Lucio Franco 60e6d5df08 Rename client to channel 2019-09-01 12:44:01 -04:00
Lucio Franco cc2fa986a6 Add both rustls and openssl client tls implementation 2019-09-01 01:37:19 -04:00
Lucio Franco 4ea3fdfd1e Inital tls 2019-08-31 15:59:51 -04:00
Lucio Franco 4000c42478 Add buffer support 2019-08-31 03:18:52 -04:00
Lucio Franco 644cc310f7 Use tower-reconnect 2019-08-31 02:14:45 -04:00
Lucio Franco 2ce4a7969e Basic default client 2019-08-31 00:52:26 -04:00
Lucio Franco 0393172f95 Update hyper and other fixes 2019-08-30 23:30:12 -04:00
Lucio Franco 91a3c0965a Add trailing metadata for unary/client-streaming 2019-08-28 23:15:05 -04:00
Lucio Franco bfab56d42d Add trailing metadata and fix test 2019-08-28 20:09:43 -04:00
Lucio Franco f750dfa111 Fix interoptests and rewrite decode 2019-08-28 17:24:53 -04:00
Lucio Franco a9e2f0e250 work 2019-08-24 12:18:24 -07:00
Lucio Franco 8ae279eb2f Expose builder 2019-08-21 21:11:02 -04:00
Lucio Franco ae0500f48f more interop tests 2019-08-21 20:55:58 -04:00
Lucio Franco 93eb9989d6 Fix encoding, more interop and update nightly version 2019-08-21 18:50:27 -04:00
Lucio Franco 8dc1185a36 Add first pass at interop tests 2019-08-18 21:04:00 -04:00