gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/grpc/reflection/README.md (about) 1 # Reflection 2 3 Package reflection implements server reflection service. 4 5 The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. 6 7 To register server reflection on a gRPC server: 8 ```go 9 import "gitee.com/ks-custle/core-gm/grpc/reflection" 10 11 s := grpc.NewServer() 12 pb.RegisterYourOwnServer(s, &server{}) 13 14 // Register reflection service on gRPC server. 15 reflection.Register(s) 16 17 s.Serve(lis) 18 ```