github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/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 "github.com/hxx258456/ccgo/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  ```