grpcreflect

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package grpcreflect provides GRPC-specific extensions to protobuf reflection. This includes a way to access rich service descriptors for all services that a GRPC server exports.

Also included is an easy-to-use client for the GRPC reflection service (https://goo.gl/2ILAHf). This client makes it easy to ask a server (that supports the reflection service) for metadata on its exported services, which could be used to construct a dynamic client. (See the grpcdynamic package in this same repo for more on that.)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadServiceDescriptor

func LoadServiceDescriptor(svc *grpc.ServiceDesc) (*desc.ServiceDescriptor, error)

LoadServiceDescriptor loads a rich descriptor for a given service description generated by protoc-gen-gogo. Generated code contains an unexported symbol with a name like "_<Service>_serviceDesc" which is the service's description. It is used internally to register a service implementation with a GRPC server. But it can also be used by this package to retrieve the rich descriptor for the service.

func LoadServiceDescriptors

func LoadServiceDescriptors(s *grpc.Server) (map[string]*desc.ServiceDescriptor, error)

LoadServiceDescriptors loads the service descriptors for all services exposed by the given GRPC server.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL