Skip to content

Commit ba3bd4b

Browse files
authored
Merge pull request #1996 from josephharrington/patch-1
Document grpc-js supported channel args in readme
2 parents 0dbcbcc + 78631cd commit ba3bd4b

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

PACKAGE-COMPARISON.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,5 @@ Supported Electron Versions | All | >= 3
2828
Supported Platforms | Linux, Windows, MacOS | All
2929
Supported Architectures | x86, x86-64, ARM7+ | All
3030

31-
In addition, all channel arguments defined in [this header file](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/grpc_types.h) are handled by the `grpc` library. Of those, the following are handled by the `@grpc/grpc-js` library:
32-
33-
- `grpc.ssl_target_name_override`
34-
- `grpc.primary_user_agent`
35-
- `grpc.secondary_user_agent`
36-
- `grpc.default_authority`
37-
- `grpc.keepalive_time_ms`
38-
- `grpc.keepalive_timeout_ms`
39-
- `grpc.keepalive_permit_without_calls`
40-
- `grpc.service_config`
41-
- `grpc.max_concurrent_streams`
42-
- `grpc.initial_reconnect_backoff_ms`
43-
- `grpc.max_reconnect_backoff_ms`
44-
- `grpc.use_local_subchannel_pool`
45-
- `grpc.max_send_message_length`
46-
- `grpc.max_receive_message_length`
47-
- `grpc.enable_http_proxy`
48-
- `channelOverride`
49-
- `channelFactoryOverride`
31+
In addition, all channel arguments defined in [this header file](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/grpc_types.h) are handled by the `grpc` library.
32+
Of those, a subset are handled by the `@grpc/grpc-js` library. See [the README](https://github.com/grpc/grpc-node/blob/master/packages/grpc-js/README.md#supported-channel-options) for `@grpc/grpc-js` for the list of supported channel options.

packages/grpc-js/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,28 @@ This library does not directly handle `.proto` files. To use `.proto` files with
3636
- 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`.
3737
- 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`.
3838
- If you have a server and you are using `Server#bind` to bind ports, you will need to use `Server#bindAsync` instead.
39+
- 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](#supported-channel-options) below.
40+
- Refer to the [detailed package comparison](https://github.com/grpc/grpc-node/blob/master/PACKAGE-COMPARISON.md) for more details on the differences between `grpc` and `@grpc/grpc-js`.
41+
42+
## Supported Channel Options
43+
Many channel arguments supported in `grpc` are not supported in `@grpc/grpc-js`. The channel arguments supported by `@grpc/grpc-js` are:
44+
- `grpc.ssl_target_name_override`
45+
- `grpc.primary_user_agent`
46+
- `grpc.secondary_user_agent`
47+
- `grpc.default_authority`
48+
- `grpc.keepalive_time_ms`
49+
- `grpc.keepalive_timeout_ms`
50+
- `grpc.keepalive_permit_without_calls`
51+
- `grpc.service_config`
52+
- `grpc.max_concurrent_streams`
53+
- `grpc.initial_reconnect_backoff_ms`
54+
- `grpc.max_reconnect_backoff_ms`
55+
- `grpc.use_local_subchannel_pool`
56+
- `grpc.max_send_message_length`
57+
- `grpc.max_receive_message_length`
58+
- `grpc.enable_http_proxy`
59+
- `channelOverride`
60+
- `channelFactoryOverride`
3961

4062
## Some Notes on API Guarantees
4163

0 commit comments

Comments
 (0)