Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileDescriptorRanger ¶ added in v0.0.29
type FileDescriptorRanger interface { // RangeFiles calls fn for each FileDescriptor in the Ranger, stopping // when there are no more or when fn returns false. RangeFiles(fn func(protoreflect.FileDescriptor) bool) }
FileDescriptorRanger iterates over a set of FileDescriptors.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is an implementation of the gRPC ServerReflection service, using a protoregistry.Files as the source of data for serving the reflection methods. No global protobuf/grpc state is consulted for serving.
func NewService ¶
func NewService(files FileDescriptorRanger) *Service
NewService returns a new Service that implements the gRPC ServerReflection service from the given files registry. The files registry is cloned so that the reflection file descriptor can be registered without mutating the argument.
func (*Service) Register ¶
func (s *Service) Register(gs grpc.ServiceRegistrar)
Register the s Service with the gs grpc ServiceRegistrar. This is a convenience function so the caller does not need to import the grpc_reflection_v1 package.
func (*Service) ServerReflectionInfo ¶
func (s *Service) ServerReflectionInfo(stream pb.ServerReflection_ServerReflectionInfoServer) error
ServerReflectionInfo implements pb.ServerReflectionServer