src/python/grpcio_admin/grpc_admin/__init__.py
Go to the documentation of this file.
1 # Copyright 2021 The gRPC Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 """gRPC Python's Admin interface."""
15 
16 from grpc_channelz.v1 import channelz
17 import grpc_csds
18 
19 
20 def add_admin_servicers(server):
21  """Register admin servicers to a server.
22 
23  gRPC provides some predefined admin services to make debugging easier by
24  exposing gRPC's internal states. Each existing admin service is packaged as
25  a separate library, and the documentation of the predefined admin services
26  is usually scattered. It can be time consuming to get the dependency
27  management, module initialization, and library import right for each one of
28  them.
29 
30  This API provides a convenient way to create a gRPC server to expose admin
31  services. With this, any new admin services that you may add in the future
32  are automatically available via the admin interface just by upgrading your
33  gRPC version.
34 
35  Args:
36  server: A gRPC server to which all admin services will be added.
37  """
38  channelz.add_channelz_servicer(server)
40 
41 
42 __all__ = ['add_admin_servicers']
grpc_channelz.v1
Definition: src/python/grpcio_channelz/grpc_channelz/v1/__init__.py:1
grpc_csds.add_csds_servicer
def add_csds_servicer(server)
Definition: src/python/grpcio_csds/grpc_csds/__init__.py:41
grpc_admin.add_admin_servicers
def add_admin_servicers(server)
Definition: src/python/grpcio_admin/grpc_admin/__init__.py:20


grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:38