metadata

package
v1.0.30 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_metadata_metadata_proto protoreflect.FileDescriptor
View Source
var Metadata_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kratos.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/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 RegisterMetadataHTTPServer

func RegisterMetadataHTTPServer(s *http.Server, srv MetadataHTTPServer)

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 MetadataHTTPClient

type MetadataHTTPClient interface {
	GetServiceDesc(ctx context.Context, req *GetServiceDescRequest, opts ...http.CallOption) (rsp *GetServiceDescReply, err error)
	ListServices(ctx context.Context, req *ListServicesRequest, opts ...http.CallOption) (rsp *ListServicesReply, err error)
}

func NewMetadataHTTPClient

func NewMetadataHTTPClient(client *http.Client) MetadataHTTPClient

type MetadataHTTPClientImpl

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

func (*MetadataHTTPClientImpl) GetServiceDesc

func (*MetadataHTTPClientImpl) ListServices

type MetadataHTTPServer

type MetadataHTTPServer interface {
	GetServiceDesc(context.Context, *GetServiceDescRequest) (*GetServiceDescReply, error)
	ListServices(context.Context, *ListServicesRequest) (*ListServicesReply, error)
}

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)
	// 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 api meta server

func NewServer

func NewServer(srv *grpc.Server) *Server

NewServer create server instance

func (*Server) GetServiceDesc

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

GetServiceDesc return service meta by name

func (*Server) ListServices

func (s *Server) ListServices(_ context.Context, _ *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