aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_reflection
diff options
context:
space:
mode:
authorGravatar Mehrdad Afshari <mmx@google.com>2017-04-04 12:41:06 -0700
committerGravatar Mehrdad Afshari <mehrdada@users.noreply.github.com>2017-04-04 16:43:37 -0700
commit0cbfad62cf087b9170f6b3aee9925161de94e865 (patch)
tree98474c8d4f5012aa8737f5504bad8e5040c30ace /src/python/grpcio_reflection
parentc02f36bc9ec4baab246c1bd869d679ed19ab8580 (diff)
Support custom pool in enable_server_reflection
Diffstat (limited to 'src/python/grpcio_reflection')
-rw-r--r--src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py b/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
index c8ad9668ac..c58cb3ecf1 100644
--- a/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
+++ b/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
@@ -143,12 +143,13 @@ class ReflectionServicer(reflection_pb2.ServerReflectionServicer):
.encode(),))
-def enable_server_reflection(service_names, server):
+def enable_server_reflection(service_names, server, pool=None):
"""Enables server reflection on a server.
Args:
service_names: Iterable of fully-qualified service names available.
server: grpc.Server to which reflection service will be added.
+ pool: DescriptorPool object to use (descriptor_pool.Default() if None).
"""
reflection_pb2_grpc.add_ServerReflectionServicer_to_server(
- ReflectionServicer(service_names), server)
+ ReflectionServicer(service_names), server, pool)