Documentation ¶
Overview ¶
Package discovery implements RPC service introspection.
Package discovery is a generated protocol buffer package.
It is generated from these files:
github.com/luci/luci-go/grpc/discovery/service.proto
It has these top-level messages:
Void DescribeResponse
Index ¶
- func Enable(server *prpc.Server)
- func FileDescriptorSet() *descriptor.FileDescriptorSet
- func GetDescriptorSet(serviceName string) (*descriptor.FileDescriptorSet, error)
- func RegisterDescriptorSetCompressed(serviceNames []string, compressedDescriptorSet []byte)
- func RegisterDiscoveryServer(s prpc.Registrar, srv DiscoveryServer)
- type DescribeResponse
- func (*DescribeResponse) Descriptor() ([]byte, []int)
- func (m *DescribeResponse) GetDescription() *google_protobuf.FileDescriptorSet
- func (m *DescribeResponse) GetServices() []string
- func (*DescribeResponse) ProtoMessage()
- func (m *DescribeResponse) Reset()
- func (m *DescribeResponse) String() string
- type DiscoveryClient
- type DiscoveryServer
- type Void
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enable ¶
Enable registers a discovery service on the server. It makes all currently registered services and the discovery service discoverable.
func FileDescriptorSet ¶
func FileDescriptorSet() *descriptor.FileDescriptorSet
FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.
Will not return nil.
Do NOT modify the returned descriptor.
func GetDescriptorSet ¶
func GetDescriptorSet(serviceName string) (*descriptor.FileDescriptorSet, error)
GetDescriptorSet returns a descriptor set that contains the request service, its message types and all transitive dependencies. Returns (nil, nil) if the service descriptor is unknown.
Do NOT modify the returned descriptor.
func RegisterDescriptorSetCompressed ¶
RegisterDescriptorSetCompressed registers a descriptor set for a set of services. Called from code generated by github.com/luci/luci-go/grpc/cmd/cproto
compressedDescriptorSet must be a valid descriptor.FileDescriptorSet message compressed wit gzip. It must contain descriptions for all the services, their message types and all transitive dependencies.
This call is cheap.
func RegisterDiscoveryServer ¶
func RegisterDiscoveryServer(s prpc.Registrar, srv DiscoveryServer)
Types ¶
type DescribeResponse ¶
type DescribeResponse struct { // Description contains descriptions of all services, their types and all // transitive dependencies. Description *google_protobuf.FileDescriptorSet `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` // Services are service names provided by a server. Services []string `protobuf:"bytes,2,rep,name=services" json:"services,omitempty"` }
DescribeResponse describes services.
func (*DescribeResponse) Descriptor ¶
func (*DescribeResponse) Descriptor() ([]byte, []int)
func (*DescribeResponse) GetDescription ¶
func (m *DescribeResponse) GetDescription() *google_protobuf.FileDescriptorSet
func (*DescribeResponse) GetServices ¶
func (m *DescribeResponse) GetServices() []string
func (*DescribeResponse) ProtoMessage ¶
func (*DescribeResponse) ProtoMessage()
func (*DescribeResponse) Reset ¶
func (m *DescribeResponse) Reset()
func (*DescribeResponse) String ¶
func (m *DescribeResponse) String() string
type DiscoveryClient ¶
type DiscoveryClient interface { // Describe returns a list of services and a descriptor.FileDescriptorSet // that covers them all. Describe(ctx context.Context, in *Void, opts ...grpc.CallOption) (*DescribeResponse, error) }
func NewDiscoveryClient ¶
func NewDiscoveryClient(cc *grpc.ClientConn) DiscoveryClient
func NewDiscoveryPRPCClient ¶
func NewDiscoveryPRPCClient(client *prpc.Client) DiscoveryClient
type DiscoveryServer ¶
type DiscoveryServer interface { // Describe returns a list of services and a descriptor.FileDescriptorSet // that covers them all. Describe(context.Context, *Void) (*DescribeResponse, error) }
func New ¶
func New(serviceNames ...string) (DiscoveryServer, error)
New creates a discovery server for all the given services. The service descriptions must be registered using RegisterDescriptorSetCompressed which is called by init() function generated by github.com/luci/luci-go/grpc/cmd/cproto.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
testservices
Package testservices is a generated protocol buffer package.
|
Package testservices is a generated protocol buffer package. |