grpc 1.0.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 95

The Dart implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.

Build Status pub package

Usage #

See the Dart gRPC Quickstart.

Status #

If you experience issues, or if you have feature requests, please open an issue.

Notes #

This library requires Dart SDK version 2.0 or later.

It currently supports the the Flutter and VM/Server platforms. The potential addition of gRPC-Web is tracked in issue 43.

1.0.2 #

  • Fix bug where the server would crash if the client would break the connection.

1.0.1 #

  • Add service_api.dart that only contains the minimal imports needed by the code generated by protoc_plugin.

1.0.0+1 #

  • Support package:http2 1.0.0.

1.0.0 #

  • Graduate package to 1.0.

0.6.8+1 #

  • Removes stray files that where published by accident in version 0.6.8.

0.6.8 #

  • Calling terminate() or shutdown() on a channel doesn't throw error if the channel is not yet open.

0.6.7 #

  • Support package:test 1.5.

0.6.6 #

  • Support package:http >=0.11.3+17 <0.13.0.
  • Update package:googleapis_auth to ^0.2.5+3.

0.6.5 #

  • Interceptors are now async.

0.6.4 #

  • Update dependencies to be compatible with Dart 2.

0.6.3 #

  • Make fields of StatusCode const rather than final.

0.6.2 #

  • Allow for non-ascii header values.

0.6.1 #

  • More fixes to update to Dart 2 core library APIs.

0.6.0+1 #

  • Updated implementation to use new Dart 2 APIs using dart2_fix.

0.6.0 #

  • Dart SDK upper constraint raised to declare compatability with Dart 2.0 stable.

0.5.0 #

  • Breaking change: The package now exclusively supports Dart 2.
  • Fixed tests to pass in Dart 2.
  • Added support for Interceptors (issue #79); thanks to @mogol for contributing!

0.4.1 #

  • Fixes for supporting Dart 2.

0.4.0 #

  • Moved TLS credentials for server into a separate class.
  • Added support for specifying the address for the server, and support for serving on an ephemeral port.

0.3.1 #

  • Split out TLS credentials to a separate class.

0.3.0 #

  • Added authentication metadata providers, optimized for use with Google Cloud.
  • Added service URI to metadata provider API, needed for Json Web Token generation.
  • Added authenticated cloud-to-prod interoperability tests.
  • Refactored connection logic to throw initial connection errors early.

0.2.1 #

  • Updated generated code in examples using latest protoc compiler plugin.
  • Dart 2.0 fixes.
  • Changed license to Apache 2.0.

0.2.0 #

  • Implemented support for per-RPC metadata providers. This can be used for authentication providers which may need to obtain or refresh a token before the RPC is sent.

0.1.0 #

The API is shaping up, but may still change as more advanced features are implemented.

0.0.1 #

  • Initial version.

This package is in a very early and experimental state. We do not recommend using it for anything but experiments.

example/README.md

Four code examples are available:

  1. /helloworld/: A demonstration of using the Dart gRPC library to perform unary RPs.

  2. /googleapis/: A demonstration of using the Dart gRPC library to communicate with Google APIs.

  3. /metadata/: A demonstration of how to handle custom metadata, cancellation, and timeouts in Dart gRPC.

  4. /route_guide/: A demonstration of how to perform unary, client streaming, server streaming and full duplex RPCs.

For a complete, step-wise working example, see the Dart gRPC Quickstart.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  grpc: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:grpc/grpc.dart';
  
Version Uploaded Documentation Archive
1.0.2 Apr 3, 2019 Go to the documentation of grpc 1.0.2 Download grpc 1.0.2 archive
1.0.1 Jan 24, 2019 Go to the documentation of grpc 1.0.1 Download grpc 1.0.1 archive
1.0.0+1 Jan 22, 2019 Go to the documentation of grpc 1.0.0+1 Download grpc 1.0.0+1 archive
1.0.0 Dec 17, 2018 Go to the documentation of grpc 1.0.0 Download grpc 1.0.0 archive
0.6.8+1 Dec 13, 2018 Go to the documentation of grpc 0.6.8+1 Download grpc 0.6.8+1 archive
0.6.8 Nov 12, 2018 Go to the documentation of grpc 0.6.8 Download grpc 0.6.8 archive
0.6.6 Oct 24, 2018 Go to the documentation of grpc 0.6.6 Download grpc 0.6.6 archive
0.6.5 Sep 18, 2018 Go to the documentation of grpc 0.6.5 Download grpc 0.6.5 archive
0.6.4 Sep 7, 2018 Go to the documentation of grpc 0.6.4 Download grpc 0.6.4 archive
0.6.1 Jul 19, 2018 Go to the documentation of grpc 0.6.1 Download grpc 0.6.1 archive

All 21 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
93
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
95
Learn more about scoring.

We analyzed this package on Apr 12, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, other

Primary library: package:grpc/grpc.dart with components: io.

Health suggestions

Fix lib/src/client/options.dart. (-1 points)

Analysis of lib/src/client/options.dart reported 2 hints:

line 28 col 7: The top level variable '_minConnectTimeout' isn't used.

line 85 col 25: 'alpnSupported' is deprecated and shouldn't be used.

Fix lib/grpc.dart. (-0.50 points)

Analysis of lib/grpc.dart reported 1 hint:

line 27 col 39: 'ServerHandler' is deprecated and shouldn't be used.

Fix lib/src/auth/auth.dart. (-0.50 points)

Analysis of lib/src/auth/auth.dart reported 1 hint:

line 47 col 7: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Fix additional 3 files with analysis or formatting issues. (-1.50 points)

Additional issues in the following files:

  • lib/src/client/call.dart (1 hint)
  • lib/src/client/connection.dart (1 hint)
  • lib/src/shared/security.dart (1 hint)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
async >=1.13.3 <3.0.0 2.2.0
googleapis_auth ^0.2.5+3 0.2.7
http >=0.11.3+17 <0.13.0 0.12.0+2
http2 >=0.1.7 <2.0.0 1.0.0
meta ^1.0.5 1.1.7
Transitive dependencies
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
http_parser 3.1.3
path 1.6.2
pedantic 1.5.0
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
mockito ^4.0.0
test ^1.6.1