metadata

package
v0.2.10-74 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package metadata is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Metadata_ListServices_FullMethodName   = "/lava.service.Metadata/ListServices"
	Metadata_GetServiceDesc_FullMethodName = "/lava.service.Metadata/GetServiceDesc"
)

Variables

View Source
var File_proto_services_metadata_metadata_proto protoreflect.FileDescriptor
View Source
var Metadata_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "lava.service.Metadata",
	HandlerType: (*MetadataServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListServices",
			Handler:    _Metadata_ListServices_Handler,
		},
		{
			MethodName: "GetServiceDesc",
			Handler:    _Metadata_GetServiceDesc_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/services/metadata/metadata.proto",
}

Metadata_ServiceDesc is the grpc.ServiceDesc for Metadata service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMetadataHandler

func RegisterMetadataHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMetadataHandler registers the http handlers for service Metadata to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMetadataHandlerClient

func RegisterMetadataHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetadataClient) error

RegisterMetadataHandlerClient registers the http handlers for service Metadata to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MetadataClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MetadataClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MetadataClient" to call the correct interceptors.

func RegisterMetadataHandlerFromEndpoint

func RegisterMetadataHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMetadataHandlerFromEndpoint is same as RegisterMetadataHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMetadataHandlerServer

func RegisterMetadataHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MetadataServer) error

RegisterMetadataHandlerServer registers the http handlers for service Metadata to "mux". UnaryRPC :call MetadataServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMetadataHandlerFromEndpoint instead.

func RegisterMetadataServer

func RegisterMetadataServer(s grpc.ServiceRegistrar, srv MetadataServer)

Types

type GetServiceDescReply

type GetServiceDescReply struct {
	FileDescSet *descriptorpb.FileDescriptorSet `protobuf:"bytes,1,opt,name=file_desc_set,json=fileDescSet,proto3" json:"file_desc_set,omitempty"`
	// contains filtered or unexported fields
}

func (*GetServiceDescReply) Descriptor deprecated

func (*GetServiceDescReply) Descriptor() ([]byte, []int)

Deprecated: Use GetServiceDescReply.ProtoReflect.Descriptor instead.

func (*GetServiceDescReply) GetFileDescSet

func (x *GetServiceDescReply) GetFileDescSet() *descriptorpb.FileDescriptorSet

func (*GetServiceDescReply) ProtoMessage

func (*GetServiceDescReply) ProtoMessage()

func (*GetServiceDescReply) ProtoReflect

func (x *GetServiceDescReply) ProtoReflect() protoreflect.Message

func (*GetServiceDescReply) Reset

func (x *GetServiceDescReply) Reset()

func (*GetServiceDescReply) String

func (x *GetServiceDescReply) String() string

type GetServiceDescRequest

type GetServiceDescRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetServiceDescRequest) Descriptor deprecated

func (*GetServiceDescRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetServiceDescRequest.ProtoReflect.Descriptor instead.

func (*GetServiceDescRequest) GetName

func (x *GetServiceDescRequest) GetName() string

func (*GetServiceDescRequest) ProtoMessage

func (*GetServiceDescRequest) ProtoMessage()

func (*GetServiceDescRequest) ProtoReflect

func (x *GetServiceDescRequest) ProtoReflect() protoreflect.Message

func (*GetServiceDescRequest) Reset

func (x *GetServiceDescRequest) Reset()

func (*GetServiceDescRequest) String

func (x *GetServiceDescRequest) String() string

type ListServicesReply

type ListServicesReply struct {
	Services []string `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
	Methods  []string `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"`
	// contains filtered or unexported fields
}

func (*ListServicesReply) Descriptor deprecated

func (*ListServicesReply) Descriptor() ([]byte, []int)

Deprecated: Use ListServicesReply.ProtoReflect.Descriptor instead.

func (*ListServicesReply) GetMethods

func (x *ListServicesReply) GetMethods() []string

func (*ListServicesReply) GetServices

func (x *ListServicesReply) GetServices() []string

func (*ListServicesReply) ProtoMessage

func (*ListServicesReply) ProtoMessage()

func (*ListServicesReply) ProtoReflect

func (x *ListServicesReply) ProtoReflect() protoreflect.Message

func (*ListServicesReply) Reset

func (x *ListServicesReply) Reset()

func (*ListServicesReply) String

func (x *ListServicesReply) String() string

type ListServicesRequest

type ListServicesRequest struct {
	// contains filtered or unexported fields
}

func (*ListServicesRequest) Descriptor deprecated

func (*ListServicesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListServicesRequest.ProtoReflect.Descriptor instead.

func (*ListServicesRequest) ProtoMessage

func (*ListServicesRequest) ProtoMessage()

func (*ListServicesRequest) ProtoReflect

func (x *ListServicesRequest) ProtoReflect() protoreflect.Message

func (*ListServicesRequest) Reset

func (x *ListServicesRequest) Reset()

func (*ListServicesRequest) String

func (x *ListServicesRequest) String() string

type MetadataClient

type MetadataClient interface {
	// ListServices list the full name of all services.
	ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesReply, error)
	// GetServiceDesc get the full fileDescriptorSet of service.
	GetServiceDesc(ctx context.Context, in *GetServiceDescRequest, opts ...grpc.CallOption) (*GetServiceDescReply, error)
}

MetadataClient is the client API for Metadata service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMetadataClient

func NewMetadataClient(cc grpc.ClientConnInterface) MetadataClient

type MetadataServer

type MetadataServer interface {
	// ListServices list the full name of all services.
	ListServices(context.Context, *ListServicesRequest) (*ListServicesReply, error)
	// GetServiceDesc get the full fileDescriptorSet of service.
	GetServiceDesc(context.Context, *GetServiceDescRequest) (*GetServiceDescReply, error)
}

MetadataServer is the server API for Metadata service. All implementations should embed UnimplementedMetadataServer for forward compatibility

type UnimplementedMetadataServer

type UnimplementedMetadataServer struct {
}

UnimplementedMetadataServer should be embedded to have forward compatible implementations.

func (UnimplementedMetadataServer) GetServiceDesc

func (UnimplementedMetadataServer) ListServices

type UnsafeMetadataServer

type UnsafeMetadataServer interface {
	// contains filtered or unexported methods
}

UnsafeMetadataServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MetadataServer will result in compilation errors.

Jump to

Keyboard shortcuts

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