Skip to content
Snippets Groups Projects
Commit 0cbfad62 authored by Mehrdad Afshari's avatar Mehrdad Afshari Committed by Mehrdad Afshari
Browse files

Support custom pool in enable_server_reflection

parent c02f36bc
No related branches found
No related tags found
No related merge requests found
...@@ -143,12 +143,13 @@ class ReflectionServicer(reflection_pb2.ServerReflectionServicer): ...@@ -143,12 +143,13 @@ class ReflectionServicer(reflection_pb2.ServerReflectionServicer):
.encode(),)) .encode(),))
def enable_server_reflection(service_names, server): def enable_server_reflection(service_names, server, pool=None):
"""Enables server reflection on a server. """Enables server reflection on a server.
Args: Args:
service_names: Iterable of fully-qualified service names available. service_names: Iterable of fully-qualified service names available.
server: grpc.Server to which reflection service will be added. 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( reflection_pb2_grpc.add_ServerReflectionServicer_to_server(
ReflectionServicer(service_names), server) ReflectionServicer(service_names), server, pool)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment