MCPcopy
hub / github.com/grpc/grpc-go / Register

Function Register

reflection/serverreflection.go:62–66  ·  view source on GitHub ↗

Register registers the server reflection service on the given gRPC server. Both the v1 and v1alpha versions are registered.

(s GRPCServer)

Source from the content-addressed store, hash-verified

60// Register registers the server reflection service on the given gRPC server.
61// Both the v1 and v1alpha versions are registered.
62func Register(s GRPCServer) {
63 svr := NewServerV1(ServerOptions{Services: s})
64 v1alphareflectiongrpc.RegisterServerReflectionServer(s, asV1Alpha(svr))
65 v1reflectiongrpc.RegisterServerReflectionServer(s, svr)
66}
67
68// RegisterV1 registers only the v1 version of the server reflection service
69// on the given gRPC server. Many clients may only support v1alpha so most

Callers 4

TestReflectionEnd2endMethod · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92

Calls 2

NewServerV1Function · 0.85
asV1AlphaFunction · 0.85

Tested by 1

TestReflectionEnd2endMethod · 0.74