Commit Graph

125 Commits

Author SHA1 Message Date
Michael Thomsen c32a9e97be
Use new Dart 2 APIs (#99)
* Upgrade to Dart 2 APIs

* Run dartfmt

* Update CHANGELOG.md

* Update pubspec.yaml
2018-07-13 12:57:18 +02:00
German Saprykin 847a3625e1 Added interceptors. (#86)
* Add draft implementation of interceptors.

* Fix review comment.

* Revert example files.

* Revert interop files.

* Revert interop files.

* Format.

* Fix typos.
2018-07-09 16:57:07 +02:00
Jakob Andersen 88485bad11
Tweaks. (#82)
Using address: 'localhost' didn't work as expected in the Docker
environment, so reverting to old behavior.

Fixed a typo.
2018-04-06 11:35:11 +02:00
Jakob Andersen 686ecb3943
Dart 2 fixes (#77) 2018-04-05 09:43:42 +02:00
Jakob Andersen 0393703f58
Ensure shutdown and terminate always return a Future<Null>. (#75)
Even if _transport.finish()/terminate() returns some other kind of
Future.
2018-03-28 14:54:09 +02:00
Jakob Andersen d9dea0e489
Move TLS credentials for server into a separate class. (#61)
Add address parameter for server, to control which address to listen to,
and the ability to use an ephemeral port.
2018-03-14 16:38:52 +01:00
Jakob Andersen 40ffab8da5
Split out TLS credentials to a separate class. (#60)
Add a 'bad certificate handler' to the new ChannelCredentials, which can
be used to override certificate validation (for example, to allow
auto-generated self-signed certificates during development).

Also fixed a bug in Server.shutdown().
2018-02-27 10:10:44 +01:00
Jakob Andersen 3f60746689
Fix lint. (#58) 2018-02-06 13:31:59 -08:00
Jakob Andersen 7621132097
Authenticated cloud-to-prod interop tests. (#55)
Added authentication provider classes, and wired up the auth interop
tests.

Refactored connection logic to throw initial connection errors early.

Fixes #53
2018-02-05 23:17:16 +01:00
Jakob Andersen eb5b80504d
Dart 2.0 fixes. (#48)
Updated generated code in examples using latest protoc compiler plugin.
Fixed uses-dynamic-as-bottom issues.
2018-01-12 15:20:03 +01:00
Michael Thomsen a01be59ab4 Change license to Apache to be consistent with other gRPC repos (#47) 2018-01-12 15:14:19 +01:00
Jakob Andersen b38b1cc7a2
Reorganize code for 0.2.0 release. (#41)
Split the large client/server.dart files into smaller pieces. This is in
preparation for splitting the HTTP/2 dependencies into a separate file
and make it easier to implement other transports.
2017-12-15 09:30:56 +01:00
Jakob Andersen 108181c2d2
Added support for metadata providers. (#39)
Provide a hook for metadata providers that need to generate their
metadata for each RPC. An example is authorization, where the provider
may need to refresh a token before it can provide the header.

Add stackdriver logging examplei to demonstrate calling a Google API.

Updated other examples to protobuf 0.6.0 (protoc plugin 0.7.8).

Updated SDK requirement to Dart 1.24.3, which adds support for creating a SecurityContext that trusts built-in roots, and support for ALPN on macOS.
2017-12-14 14:32:06 +01:00
Jakob Andersen 7b2ff3e571 Multiplex RPCs on a single connection. (#34)
A Channel will now multiplex RPCs on a single managed connection. The
connection will attempt to reconnect on failure, and will close the
underlying transport connection if no RPCs have been made for a while.

Part of #5.
2017-10-12 15:37:29 +02:00
Jakob Andersen 2f118ea043 Preparation for RPC multiplexing (#31)
First stage of separating Connection from Channel. A Channel manages
multiple Connections, and chooses which Connection to send an RPC on.

In this change, the Channel still creates a Connection for each RPC.
Managing the Connection life-cycle comes in a later change.
2017-09-25 13:51:40 +02:00
Jakob Andersen 05bb6a5d08 Update generated code using latest protoc_plugin. (#30)
Preparation for updating the call generation logic.
2017-08-23 12:47:48 +02:00
Jakob Andersen 83ee9c2edb Add TLS support. (#29)
Added ChannelOptions, which are used to specify options on a
ClientChannel. At the moment, only TLS options are supported.

Moved CallOptions from ClientChannel to a new Client stub base class.
Per-RPC call options are now specified on the stub instead of on the
channel, allowing several stubs with different options to share the same
channel.

Added support for TLS on the server side. TLS options are specified when
creating the Server.
2017-08-17 09:45:11 +02:00
Jakob Andersen 5c4e50c696 Add timeout handling. (#28)
Fixes #8.
2017-07-31 14:47:29 +02:00
Jakob Andersen 1d12c5b87d Add basic server tests. (#27) 2017-07-18 15:14:13 +02:00
Jakob Andersen 0a0a9ffc89 Basic server interoperability tests. (#25)
Implements the basic server interoperability tests for gRPC compliance.
Compressed tests, TLS, and authentication are not implemented yet, but
basic test cases pass against the C++ gRPC interoperability client.
2017-07-17 16:12:13 +02:00
Jakob Andersen ac317e6e4d Add basic client tests. (#26) 2017-07-17 15:11:45 +02:00
Jakob Andersen ed5e8fb43e Use correct gRPC error codes. (#23)
Copied error code definitions from source grpc/grpc repo.

Fixes #7.
2017-07-10 12:53:08 +02:00
Jakob Andersen a5e740c41a Custom metadata and call cancellation. (#22)
Added an example showing how to send/receive custom metadata, and handle
call cancellation.

Implemented the remaining parts of metadata and cancel handling.

Addresses part of #8 and #12.
2017-07-07 14:31:36 +02:00
Kevin Moore 4b8d407eae Fixes to make Travis Green (#17)
* Remove unused import
* Only analyze lib and test dirs
  - work-around for https://github.com/dart-lang/sdk/issues/26212
* enable a few more lints
* remove unused field
2017-06-29 13:11:29 -07:00
Jakob Andersen bf8fb94353 Initial import. (#2)
What works:

* Client and server can talk to each other, all 4 RPC variants.
* Client can talk to Go gRPC server.

What (probably) doesn't work:

* Anything else.
2017-06-28 14:53:42 +02:00