metadata

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_metadata_proto protoreflect.FileDescriptor
View Source
var Metadata_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "titan.api.Metadata",
	HandlerType: (*MetadataServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListServices",
			Handler:    _Metadata_ListServices_Handler,
		},
		{
			MethodName: "GetServiceDesc",
			Handler:    _Metadata_GetServiceDesc_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	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 NewMetadataHandler

func NewMetadataHandler(srv MetadataHandler, opts ...web.HandleOption) http.Handler

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 列出所有服务的全名.
	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 MetadataHandler

type MetadataHandler interface {
	GetServiceDesc(context.Context, *GetServiceDescRequest) (*GetServiceDescReply, error)

	ListServices(context.Context, *ListServicesRequest) (*ListServicesReply, error)
}

type MetadataServer

type MetadataServer interface {
	// ListServices 列出所有服务的全名.
	ListServices(context.Context, *ListServicesRequest) (*ListServicesReply, error)
	// GetServiceDesc get the full fileDescriptorSet of service.
	GetServiceDesc(context.Context, *GetServiceDescRequest) (*GetServiceDescReply, error)
	// contains filtered or unexported methods
}

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

type Server

type Server struct {
	UnimplementedMetadataServer
	// contains filtered or unexported fields
}

Server is titan meta server

func NewServer

func NewServer(srv *grpc.Server) *Server

NewServer create server instance

func (*Server) GetServiceDesc

func (s *Server) GetServiceDesc(ctx context.Context, in *GetServiceDescRequest) (*GetServiceDescReply, error)

GetServiceDesc return service meta by name

func (*Server) ListServices

func (s *Server) ListServices(ctx context.Context, in *ListServicesRequest) (*ListServicesReply, error)

ListServices return all services

type UnimplementedMetadataServer

type UnimplementedMetadataServer struct {
}

UnimplementedMetadataServer must 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