Skip to content

Commit

Permalink
Support custom pool in enable_server_reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdada committed Apr 4, 2017
1 parent c02f36b commit 0cbfad6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@ def ServerReflectionInfo(self, request_iterator, context):
.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)

0 comments on commit 0cbfad6

Please sign in to comment.