grpc-dart/example/metadata
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
..
bin Custom metadata and call cancellation. (#22) 2017-07-07 14:31:36 +02:00
lib/src Preparation for RPC multiplexing (#31) 2017-09-25 13:51:40 +02:00
protos Custom metadata and call cancellation. (#22) 2017-07-07 14:31:36 +02:00
tool Custom metadata and call cancellation. (#22) 2017-07-07 14:31:36 +02:00
README.md Custom metadata and call cancellation. (#22) 2017-07-07 14:31:36 +02:00
pubspec.yaml Added support for metadata providers. (#39) 2017-12-14 14:32:06 +01:00

README.md

Description

The metadata server and client demonstrate how to handle custom metadata, cancellation, and timeouts in Dart gRPC.

See the definition of the metadata service in protos/metadata.proto.

Run the sample code

To compile and run the example, assuming you are in the root of the metadata folder, i.e., .../example/metadata/, first get the dependencies by running:

$ pub get

Then, to run the server:

$ dart bin/server.dart

Likewise, to run the client:

$ dart bin/client.dart