示例#1
0
文件: channelz.py 项目: yishuT/grpc
    def add_channelz_servicer(server):

        if isinstance(server, grpc.experimental.aio.Server):
            _channelz_pb2_grpc.add_ChannelzServicer_to_server(
                aio.ChannelzServicer(), server)
        else:
            _channelz_pb2_grpc.add_ChannelzServicer_to_server(
                ChannelzServicer(), server)
示例#2
0
def add_channelz_servicer(server):
    """Add Channelz servicer to a server. Channelz servicer is in charge of
    pulling information from C-Core for entire process. It will allow the
    server to response to Channelz queries.

    The Channelz statistic is enabled by default inside C-Core. Whether the
    statistic is enabled or not is isolated from adding Channelz servicer.
    That means you can query Channelz info with a Channelz-disabled channel,
    and you can add Channelz servicer to a Channelz-disabled server.

    The Channelz statistic can be enabled or disabled by channel option
    'grpc.enable_channelz'. Set to 1 to enable, set to 0 to disable.

    This is an EXPERIMENTAL API.

    Args:
      server: grpc.Server to which Channelz service will be added.
    """
    _channelz_pb2_grpc.add_ChannelzServicer_to_server(ChannelzServicer(),
                                                      server)
示例#3
0
def add_channelz_servicer(server):
    """Add Channelz servicer to a server. Channelz servicer is in charge of
    pulling information from C-Core for entire process. It will allow the
    server to response to Channelz queries.

    The Channelz statistic is enabled by default inside C-Core. Whether the
    statistic is enabled or not is isolated from adding Channelz servicer.
    That means you can query Channelz info with a Channelz-disabled channel,
    and you can add Channelz servicer to a Channelz-disabled server.

    The Channelz statistic can be enabled or disabled by channel option
    'grpc.enable_channelz'. Set to 1 to enable, set to 0 to disable.

    This is an EXPERIMENTAL API.

    Args:
      server: grpc.Server to which Channelz service will be added.
    """
    _channelz_pb2_grpc.add_ChannelzServicer_to_server(ChannelzServicer(),
                                                      server)
示例#4
0
文件: channelz.py 项目: yishuT/grpc
 def add_channelz_servicer(server):
     _channelz_pb2_grpc.add_ChannelzServicer_to_server(
         ChannelzServicer(), server)