Documentation ¶
Index ¶
- Variables
- func RegisterMetadataHTTPServer(s *http.Server, srv MetadataHTTPServer)
- func RegisterMetadataServer(s grpc.ServiceRegistrar, srv MetadataServer)
- type GetServiceDescReply
- func (*GetServiceDescReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetServiceDescReply) GetFileDescSet() *descriptor.FileDescriptorSet
- func (*GetServiceDescReply) ProtoMessage()
- func (x *GetServiceDescReply) ProtoReflect() protoreflect.Message
- func (x *GetServiceDescReply) Reset()
- func (x *GetServiceDescReply) String() string
- type GetServiceDescRequest
- func (*GetServiceDescRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetServiceDescRequest) GetName() string
- func (*GetServiceDescRequest) ProtoMessage()
- func (x *GetServiceDescRequest) ProtoReflect() protoreflect.Message
- func (x *GetServiceDescRequest) Reset()
- func (x *GetServiceDescRequest) String() string
- type ListServicesReply
- func (*ListServicesReply) Descriptor() ([]byte, []int)deprecated
- func (x *ListServicesReply) GetMethods() []string
- func (x *ListServicesReply) GetServices() []string
- func (*ListServicesReply) ProtoMessage()
- func (x *ListServicesReply) ProtoReflect() protoreflect.Message
- func (x *ListServicesReply) Reset()
- func (x *ListServicesReply) String() string
- type ListServicesRequest
- type MetadataClient
- type MetadataHTTPClient
- type MetadataHTTPClientImpl
- type MetadataHTTPServer
- type MetadataServer
- type Server
- type UnimplementedMetadataServer
- type UnsafeMetadataServer
Constants ¶
This section is empty.
Variables ¶
var File_metadata_proto protoreflect.FileDescriptor
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.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 *descriptor.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() *descriptor.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 (c *MetadataHTTPClientImpl) GetServiceDesc(ctx context.Context, in *GetServiceDescRequest, opts ...http.CallOption) (*GetServiceDescReply, error)
func (*MetadataHTTPClientImpl) ListServices ¶
func (c *MetadataHTTPClientImpl) ListServices(ctx context.Context, in *ListServicesRequest, opts ...http.CallOption) (*ListServicesReply, error)
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 // 此结构体实现了 全部的 grpc 方法 // contains filtered or unexported fields }
Server is api meta server
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) GetServiceDesc(context.Context, *GetServiceDescRequest) (*GetServiceDescReply, error)
func (UnimplementedMetadataServer) ListServices ¶
func (UnimplementedMetadataServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesReply, error)
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.