tree: 2fc0b984f0b48f4f7f17e5778de0da377ce66602 [path history] [tgz]
  1. grpc_reflection_v1/
  2. grpc_reflection_v1alpha/
  3. grpc_testing/
  4. grpc_testing_not_regenerate/
  5. adapt.go
  6. README.md
  7. serverreflection.go
  8. serverreflection_test.go
reflection/README.md

Reflection

Package reflection implements server reflection service.

The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto.

To register server reflection on a gRPC server:

import "google.golang.org/grpc/reflection"

s := grpc.NewServer()
pb.RegisterYourOwnServer(s, &server{})

// Register reflection service on gRPC server.
reflection.Register(s)

s.Serve(lis)