14 """Channelz debug service implementation in gRPC Python."""
20 import grpc_channelz.v1.channelz_pb2_grpc
as _channelz_pb2_grpc
22 _add_channelz_servicer_doc =
"""Add Channelz servicer to a server.
24 Channelz servicer is in charge of
25 pulling information from C-Core for entire process. It will allow the
26 server to response to Channelz queries.
28 The Channelz statistic is enabled by default inside C-Core. Whether the
29 statistic is enabled or not is isolated from adding Channelz servicer.
30 That means you can query Channelz info with a Channelz-disabled channel,
31 and you can add Channelz servicer to a Channelz-disabled server.
33 The Channelz statistic can be enabled or disabled by channel option
34 'grpc.enable_channelz'. Set to 1 to enable, set to 0 to disable.
36 This is an EXPERIMENTAL API.
39 server: A gRPC server to which Channelz service will be added.
42 if sys.version_info[0] >= 3
and sys.version_info[1] >= 6:
48 _channelz_pb2_grpc.add_ChannelzServicer_to_server(
49 aio.ChannelzServicer(), server)
51 _channelz_pb2_grpc.add_ChannelzServicer_to_server(
54 add_channelz_servicer.__doc__ = _add_channelz_servicer_doc
58 "add_channelz_servicer",
65 _channelz_pb2_grpc.add_ChannelzServicer_to_server(
68 add_channelz_servicer.__doc__ = _add_channelz_servicer_doc
71 "add_channelz_servicer",