Commit Graph

44 Commits

Author SHA1 Message Date
Sigurd Meldgaard 172cda21d2
dartfmt fix const new (#189) 2019-06-13 12:54:57 +02:00
Sigurd Meldgaard 224b5c3fe2
Export less from grpc-web.dart (#188)
* export less stuff from grpc-web.dart
2019-06-11 16:24:45 +02:00
Sigurd Meldgaard 8aa5b51760
Fix grpc-web issue when decoding empty repeated. (#187) 2019-06-06 12:23:46 +02:00
Sigurd Meldgaard 1578122a63
Remove transport for http2 (#185)
* don't use Transport for grpc-web
2019-06-04 15:12:01 +02:00
Sigurd Meldgaard be0e09691f
simplify Http2TransportStream (#182) 2019-06-03 15:03:43 +02:00
Sigurd Meldgaard 839b2ca03c
Don't use Transport for grpc-web (#177) 2019-05-27 14:34:15 +02:00
Sigurd Meldgaard af63debc43
Remove stray characters (#169) 2019-04-16 15:59:21 +02:00
Sigurd Meldgaard edc0c19073
Improve interfaces (#163)
ChannelCredentials is now a http2-only-thing

ClientCall now asks the Transport about the authority.

The Xhr client-channel now takes a Uri.
2019-04-02 15:15:40 +02:00
Sigurd Meldgaard afe0aea7f5
Explicit exports (#162) 2019-03-26 10:48:40 +01:00
Sigurd Meldgaard 61c741d173
Fix imports (#161) 2019-03-25 10:00:33 +01:00
Sigurd Meldgaard 2b7e261f3a
Handle request errors (#160) 2019-03-22 14:06:33 +01:00
Jeff Ward d58659507c Support grpc-web 2019-03-15 12:51:06 +01:00
Sigurd Meldgaard 76159960e2
Add service_api.dart with platform independent exports (#152) 2019-01-24 13:44:59 +01:00
Nic Hite eafca2ab28 Replace Future<Null> with Future<void>. (#146) 2019-01-03 08:13:25 +01:00
Alexandre Ardhuin 921f4df0b9 don't throw on closing channel not open (#128)
Don't throw on closing channel not open
2018-11-12 14:54:11 +01:00
Alexandre Ardhuin 3e3ba6682f allows async interceptors (#120)
* allows async interceptors

* prevent chunks to come before starting streaming request
2018-09-18 08:17:39 +02:00
Sigurd Meldgaard 561f8fe716
Make Status codes `static const` instead of `static final`. (#104)
Make Status codes `static const` instead of `static final`.
This enables using the codes in switch statements and default values.
2018-08-06 13:47:45 +02:00
Sigurd Meldgaard 17ce11f7fc
Allow for non ascii headers (#103) 2018-07-19 15:46:23 +02:00
Bob Nystrom 238fd7ec67 Finish migrating to the Dart 2 core library constants. (#101) 2018-07-19 15:16:58 +02:00
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