...

Package admin

import "google.golang.org/grpc/admin"
Overview
Index
Subdirectories

Overview ▾

Package admin provides a convenient method for registering a collection of administration services to a gRPC server. The services registered are:

- Channelz: https://github.com/grpc/proposal/blob/master/A14-channelz.md

- CSDS: https://github.com/grpc/proposal/blob/master/A40-csds-support.md

Experimental

Notice: All APIs in this package are experimental and may be removed in a later release.

func Register

func Register(s grpc.ServiceRegistrar) (cleanup func(), _ error)

Register registers the set of admin services to the given server.

The returned cleanup function should be called to clean up the resources allocated for the service handlers after the server is stopped.

Note that if `s` is not a *grpc.Server or a *xds.GRPCServer, CSDS will not be registered because CSDS generated code is old and doesn't support interface `grpc.ServiceRegistrar`. https://github.com/envoyproxy/go-control-plane/issues/403

Subdirectories

Name Synopsis
..
test Package test contains test only functions for package admin.