gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

Ability to set additional channel options

Open kolea2 opened this issue 4 years ago • 0 comments

In a few clients (Bigtable, Firestore), we override the transport and channel to configure custom keepalive settings, see: https://github.com/googleapis/python-bigtable/blob/76c4e9abd59ffac5fb2d8fb2298d04b9e1128d8c/google/cloud/bigtable/client.py#L217-L225 https://github.com/googleapis/python-firestore/blob/15b579f0b94aa8de3310b8bbc14916e97ac0c060/google/cloud/firestore_v1/base_client.py#L156

We cannot then use any of the default setup by grpc.py: https://github.com/googleapis/python-bigtable/blob/master/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py#L117.

It would be ideal to have an additional options parameter we can pass in on initialization, so it can be appended to the options set by the generator (https://github.com/googleapis/python-bigtable/blob/master/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py#L155-L158).

kolea2 avatar Feb 17 '21 16:02 kolea2