1.10.6 • Published 22 days ago

@grpc/grpc-js v1.10.6

Weekly downloads
2,806,855
License
Apache-2.0
Repository
github
Last release
22 days ago

Pure JavaScript gRPC Client

Installation

Node 12 is recommended. The exact set of compatible Node versions can be found in the engines field of the package.json file.

npm install @grpc/grpc-js

Documentation

Documentation specifically for the @grpc/grpc-js package is currently not available. However, documentation is available for the grpc package, and the two packages contain mostly the same interface. There are a few notable differences, however, and these differences are noted in the "Migrating from grpc" section below.

Features

  • Clients
  • Automatic reconnection
  • Servers
  • Streaming
  • Metadata
  • Partial compression support: clients can compress and decompress messages, and servers can decompress request messages
  • Pick first and round robin load balancing policies
  • Client Interceptors
  • Connection Keepalives
  • HTTP Connect support (proxies)

If you need a feature from the grpc package that is not provided by the @grpc/grpc-js, please file a feature request with that information.

This library does not directly handle .proto files. To use .proto files with this library we recommend using the @grpc/proto-loader package.

Migrating from grpc

@grpc/grpc-js is almost a drop-in replacement for grpc, but you may need to make a few code changes to use it:

  • If you are currently loading .proto files using grpc.load, that function is not available in this library. You should instead load your .proto files using @grpc/proto-loader and load the resulting package definition objects into @grpc/grpc-js using grpc.loadPackageDefinition.
  • If you are currently loading packages generated by grpc-tools, you should instead generate your files using the generate_package_definition option in grpc-tools, then load the object exported by the generated file into @grpc/grpc-js using grpc.loadPackageDefinition.
  • If you have a server and you are using Server#bind to bind ports, you will need to use Server#bindAsync instead.
  • If you are using any channel options supported in grpc but not supported in @grpc/grpc-js, you may need to adjust your code to handle the different behavior. Refer to the list of supported options below.
  • Refer to the detailed package comparison for more details on the differences between grpc and @grpc/grpc-js.

Supported Channel Options

Many channel arguments supported in grpc are not supported in @grpc/grpc-js. The channel arguments supported by @grpc/grpc-js are:

  • grpc.ssl_target_name_override
  • grpc.primary_user_agent
  • grpc.secondary_user_agent
  • grpc.default_authority
  • grpc.keepalive_time_ms
  • grpc.keepalive_timeout_ms
  • grpc.keepalive_permit_without_calls
  • grpc.service_config
  • grpc.max_concurrent_streams
  • grpc.initial_reconnect_backoff_ms
  • grpc.max_reconnect_backoff_ms
  • grpc.use_local_subchannel_pool
  • grpc.max_send_message_length
  • grpc.max_receive_message_length
  • grpc.enable_http_proxy
  • grpc.default_compression_algorithm
  • grpc.enable_channelz
  • grpc.dns_min_time_between_resolutions_ms
  • grpc.enable_retries
  • grpc.max_connection_age_ms
  • grpc.max_connection_age_grace_ms
  • grpc.max_connection_idle_ms
  • grpc.per_rpc_retry_buffer_size
  • grpc.retry_buffer_size
  • grpc.service_config_disable_resolution
  • grpc.client_idle_timeout_ms
  • grpc-node.max_session_memory
  • grpc-node.tls_enable_trace
  • channelOverride
  • channelFactoryOverride

Some Notes on API Guarantees

The public API of this library follows semantic versioning, with some caveats:

  • Some methods are prefixed with an underscore. These methods are internal and should not be considered part of the public API.
  • The class Call is only exposed due to limitations of TypeScript. It should not be considered part of the public API.
  • In general, any API that is exposed by this library but is not exposed by the grpc library is likely an error and should not be considered part of the public API.
  • The grpc.experimental namespace contains APIs that have not stabilized. Any API in that namespace may break in any minor version update.
google-gax@bugsounet/google-assistant@pulumi/pulumi@compusoluciones/grpc-connections@gitpod/supervisor-api-grpc@gitpod/ide-metrics-api-grpc@firebase/firestorebmt-web-api@bumped-inc/grpc-utilsclarifai-grpc@jakeblaxon-graphql-mesh/grpcuntaek-chat-master-nodeuntaek-chat-worker-node@iharob/graphql-mesh-grpc@kgunda_ax2/my-grpc-proto-demo@aleichter/grpc-serverinstaskfabric-gateway-sdkmdb-bpmdb-bp-webhamromini_backjspulumi-testnervatura-expressprofanity-ts-protostrophy-dapi-grpcstrophy-grpc-commonejz-coba-clientejz-coba-server@smburrows/provider@radicalbit/helicon-node-sdk2@foldsh/sdkhttpyacd@pavelg/grpct-machine-messaging@recap-utr/arg-servicesejz-cobaejz-grpcejz-sovanotnodeagentsiq_protos@cipherstash/beta-clientpostsale-tsclutch-rpc@middleware.io/mw-node-apmnowsta2-notification-protofacenowsta2-utils@cipherstash/client@cybercryptio/d1-client-nodejs@mojaloop/accounts-and-balances-bc-grpc-svcsalesforce-opentelemetry@infinitebrahmanuniverse/nolb-_grp@pfc/grpc-adapter@rickie/cli@rickie/client@cipherstash/stashjs@cipherstash/stashjs-grpc@bee4/coredietgraph@id3asnorsk/norsk-api@id3asnorsk/norsk-sdk@kintegrate/kin-sdk-v2lady-ggframework-aitecxray-windows-testxray-windows-x64xray-darwin-x64xray-linux-x64@gmahechas/erp-common-grpcjs@everything-registry/sub-chunk-376@1xtr/nodejs-sdknats-generate-servicemessina-sdkxq-test-tooling@soundboks/nanogrpc-grpc-proxy@hsuite/grpclineblocs-sdkeasygrpcdshackle-cli-toolebd-frameworkegg-gaiajsegg-obeliskegg-grpc-clientegg-grpc-client-sslegg-etcd-grpcegg-grpc-frameworkegg-grpc-jsegg-grpc2dump-sdk-testelastic-cdnelariandreams-proto-sharingdroid-rpcdtx-iamdtx-lib-api-core-nodedtx-lib-clockdtx-lib-oteldwebfs-daemondwebfs-daemon-clientdurabletask-javascript@scalar-labs/scalar-admin
1.10.6

22 days ago

1.10.5

24 days ago

1.10.4

1 month ago

1.10.3

1 month ago

1.10.2

2 months ago

1.10.1

2 months ago

1.10.0

3 months ago

1.9.14

3 months ago

1.9.13

5 months ago

1.9.12

5 months ago

1.9.11

5 months ago

1.9.10

5 months ago

1.9.1

8 months ago

1.9.0

9 months ago

1.8.20

9 months ago

1.8.21

9 months ago

1.9.9

6 months ago

1.9.8

6 months ago

1.9.7

6 months ago

1.9.6

6 months ago

1.9.5

7 months ago

1.9.4

7 months ago

1.9.3

8 months ago

1.9.2

8 months ago

1.8.18

10 months ago

1.8.19

9 months ago

1.8.17

10 months ago

1.8.15

11 months ago

1.8.16

10 months ago

1.8.13

1 year ago

1.8.14

1 year ago

1.8.9

1 year ago

1.8.10

1 year ago

1.8.8

1 year ago

1.8.11

1 year ago

1.8.12

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.8.7

1 year ago

1.8.6

1 year ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.3

1 year ago

1.7.3

2 years ago

1.7.2

2 years ago

1.6.11

2 years ago

1.6.12

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.9

2 years ago

1.6.8

2 years ago

1.6.10

2 years ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.5

2 years ago

1.5.4

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.6.7

2 years ago

1.6.6

2 years ago

1.6.5

2 years ago

1.4.6

2 years ago

1.5.9

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago

1.5.10

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.12

3 years ago

1.2.11

3 years ago

1.2.10

3 years ago

1.2.9

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.8

3 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.9

4 years ago

0.7.8

4 years ago

0.7.7

4 years ago

0.7.6

4 years ago

0.7.5

4 years ago

0.7.4

4 years ago

0.7.3

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.18

4 years ago

0.6.17

4 years ago

0.6.16

4 years ago

0.6.15

4 years ago

0.6.14

4 years ago

0.6.13

4 years ago

0.6.12

4 years ago

0.6.11

4 years ago

0.6.10

4 years ago

0.6.9

5 years ago

0.6.8

5 years ago

0.6.7

5 years ago

0.6.6

5 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago