Skip to content
Permalink
Browse files
fix: pass gRPC config options to gRPC channel creation (#26)
* fix: pass gRPC config options to grpc channel creation

* regen spanner_grpc_transport.py to include changes (via synth)

Co-authored-by: larkee <larkee@users.noreply.github.com>
  • Loading branch information
larkee and larkee committed Apr 17, 2020
1 parent 0f526bf commit 6c9a1badfed610a18454137e1b45156872914e7e
Showing with 6 additions and 0 deletions.
  1. +3 −0 google/cloud/spanner_v1/gapic/transports/spanner_grpc_transport.py
  2. +3 −0 synth.py
@@ -107,6 +107,9 @@ def create_channel(
pkg_resources.resource_string(__name__, _SPANNER_GRPC_CONFIG)
)
options = [(grpc_gcp.API_CONFIG_CHANNEL_ARG, grpc_gcp_config)]
if "options" in kwargs:
options.extend(kwargs["options"])
kwargs["options"] = options
return google.api_core.grpc_helpers.create_channel(
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
)
@@ -62,6 +62,9 @@
"\g<1>grpc_gcp_config = grpc_gcp.api_config_from_text_pb("
"\g<1> pkg_resources.resource_string(__name__, _SPANNER_GRPC_CONFIG))"
"\g<1>options = [(grpc_gcp.API_CONFIG_CHANNEL_ARG, grpc_gcp_config)]"
"\g<1>if 'options' in kwargs:"
"\g<1> options.extend(kwargs['options'])"
"\g<1>kwargs['options'] = options"
"\g<0>",
)
s.replace(

0 comments on commit 6c9a1ba

Please sign in to comment.