Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterNodeServer(s grpc.ServiceRegistrar, srv NodeServer)
- func RegisterSubscribeServer(s grpc.ServiceRegistrar, srv SubscribeServer)
- func RegisterTagServer(s grpc.ServiceRegistrar, srv TagServer)
- type GetLinksResp
- type LinkReq
- type NodeClient
- type NodeServer
- type NowResp
- type SaveLinkReq
- type SaveTagReq
- func (*SaveTagReq) Descriptor() ([]byte, []int)deprecated
- func (x *SaveTagReq) GetHash() string
- func (x *SaveTagReq) GetTag() string
- func (x *SaveTagReq) GetType() tag.TagType
- func (*SaveTagReq) ProtoMessage()
- func (x *SaveTagReq) ProtoReflect() protoreflect.Message
- func (x *SaveTagReq) Reset()
- func (x *SaveTagReq) String() string
- type SubscribeClient
- type SubscribeServer
- type TagClient
- type TagServer
- type UnimplementedNodeServer
- func (UnimplementedNodeServer) Get(context.Context, *wrapperspb.StringValue) (*point.Point, error)
- func (UnimplementedNodeServer) Latency(context.Context, *latency.Requests) (*latency.Response, error)
- func (UnimplementedNodeServer) Manager(context.Context, *emptypb.Empty) (*node.Manager, error)
- func (UnimplementedNodeServer) Now(context.Context, *emptypb.Empty) (*NowResp, error)
- func (UnimplementedNodeServer) Remove(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (UnimplementedNodeServer) Save(context.Context, *point.Point) (*point.Point, error)
- func (UnimplementedNodeServer) Use(context.Context, *UseReq) (*point.Point, error)
- type UnimplementedSubscribeServer
- func (UnimplementedSubscribeServer) Get(context.Context, *emptypb.Empty) (*GetLinksResp, error)
- func (UnimplementedSubscribeServer) Remove(context.Context, *LinkReq) (*emptypb.Empty, error)
- func (UnimplementedSubscribeServer) Save(context.Context, *SaveLinkReq) (*emptypb.Empty, error)
- func (UnimplementedSubscribeServer) Update(context.Context, *LinkReq) (*emptypb.Empty, error)
- type UnimplementedTagServer
- type UnsafeNodeServer
- type UnsafeSubscribeServer
- type UnsafeTagServer
- type UseReq
Constants ¶
const ( Node_Now_FullMethodName = "/yuhaiin.protos.node.service.node/now" Node_Use_FullMethodName = "/yuhaiin.protos.node.service.node/use" Node_Get_FullMethodName = "/yuhaiin.protos.node.service.node/get" Node_Save_FullMethodName = "/yuhaiin.protos.node.service.node/save" Node_Remove_FullMethodName = "/yuhaiin.protos.node.service.node/remove" Node_Manager_FullMethodName = "/yuhaiin.protos.node.service.node/manager" Node_Latency_FullMethodName = "/yuhaiin.protos.node.service.node/latency" )
const ( Subscribe_Save_FullMethodName = "/yuhaiin.protos.node.service.subscribe/save" Subscribe_Remove_FullMethodName = "/yuhaiin.protos.node.service.subscribe/remove" Subscribe_Update_FullMethodName = "/yuhaiin.protos.node.service.subscribe/update" Subscribe_Get_FullMethodName = "/yuhaiin.protos.node.service.subscribe/get" )
const ( Tag_Save_FullMethodName = "/yuhaiin.protos.node.service.tag/save" Tag_Remove_FullMethodName = "/yuhaiin.protos.node.service.tag/remove" )
Variables ¶
var File_node_grpc_node_proto protoreflect.FileDescriptor
var Node_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yuhaiin.protos.node.service.node", HandlerType: (*NodeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "now", Handler: _Node_Now_Handler, }, { MethodName: "use", Handler: _Node_Use_Handler, }, { MethodName: "get", Handler: _Node_Get_Handler, }, { MethodName: "save", Handler: _Node_Save_Handler, }, { MethodName: "remove", Handler: _Node_Remove_Handler, }, { MethodName: "manager", Handler: _Node_Manager_Handler, }, { MethodName: "latency", Handler: _Node_Latency_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "node/grpc/node.proto", }
Node_ServiceDesc is the grpc.ServiceDesc for Node service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Subscribe_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yuhaiin.protos.node.service.subscribe", HandlerType: (*SubscribeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "save", Handler: _Subscribe_Save_Handler, }, { MethodName: "remove", Handler: _Subscribe_Remove_Handler, }, { MethodName: "update", Handler: _Subscribe_Update_Handler, }, { MethodName: "get", Handler: _Subscribe_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "node/grpc/node.proto", }
Subscribe_ServiceDesc is the grpc.ServiceDesc for Subscribe service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Tag_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yuhaiin.protos.node.service.tag", HandlerType: (*TagServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "save", Handler: _Tag_Save_Handler, }, { MethodName: "remove", Handler: _Tag_Remove_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "node/grpc/node.proto", }
Tag_ServiceDesc is the grpc.ServiceDesc for Tag service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNodeServer ¶
func RegisterNodeServer(s grpc.ServiceRegistrar, srv NodeServer)
func RegisterSubscribeServer ¶
func RegisterSubscribeServer(s grpc.ServiceRegistrar, srv SubscribeServer)
func RegisterTagServer ¶
func RegisterTagServer(s grpc.ServiceRegistrar, srv TagServer)
Types ¶
type GetLinksResp ¶
type GetLinksResp struct { Links map[string]*subscribe.Link `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetLinksResp) Descriptor
deprecated
func (*GetLinksResp) Descriptor() ([]byte, []int)
Deprecated: Use GetLinksResp.ProtoReflect.Descriptor instead.
func (*GetLinksResp) ProtoMessage ¶
func (*GetLinksResp) ProtoMessage()
func (*GetLinksResp) ProtoReflect ¶
func (x *GetLinksResp) ProtoReflect() protoreflect.Message
func (*GetLinksResp) Reset ¶
func (x *GetLinksResp) Reset()
func (*GetLinksResp) String ¶
func (x *GetLinksResp) String() string
type LinkReq ¶
type LinkReq struct { Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` // contains filtered or unexported fields }
func (*LinkReq) Descriptor
deprecated
func (*LinkReq) ProtoMessage ¶
func (*LinkReq) ProtoMessage()
func (*LinkReq) ProtoReflect ¶
func (x *LinkReq) ProtoReflect() protoreflect.Message
type NodeClient ¶
type NodeClient interface { Now(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NowResp, error) // use req is hash string of point Use(ctx context.Context, in *UseReq, opts ...grpc.CallOption) (*point.Point, error) Get(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*point.Point, error) Save(ctx context.Context, in *point.Point, opts ...grpc.CallOption) (*point.Point, error) Remove(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) Manager(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*node.Manager, error) Latency(ctx context.Context, in *latency.Requests, opts ...grpc.CallOption) (*latency.Response, error) }
NodeClient is the client API for Node 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 NewNodeClient ¶
func NewNodeClient(cc grpc.ClientConnInterface) NodeClient
type NodeServer ¶
type NodeServer interface { Now(context.Context, *emptypb.Empty) (*NowResp, error) // use req is hash string of point Use(context.Context, *UseReq) (*point.Point, error) Get(context.Context, *wrapperspb.StringValue) (*point.Point, error) Save(context.Context, *point.Point) (*point.Point, error) Remove(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) Manager(context.Context, *emptypb.Empty) (*node.Manager, error) Latency(context.Context, *latency.Requests) (*latency.Response, error) // contains filtered or unexported methods }
NodeServer is the server API for Node service. All implementations must embed UnimplementedNodeServer for forward compatibility.
type NowResp ¶
type NowResp struct { Tcp *point.Point `protobuf:"bytes,1,opt,name=tcp,proto3" json:"tcp,omitempty"` Udp *point.Point `protobuf:"bytes,2,opt,name=udp,proto3" json:"udp,omitempty"` // contains filtered or unexported fields }
func (*NowResp) Descriptor
deprecated
func (*NowResp) ProtoMessage ¶
func (*NowResp) ProtoMessage()
func (*NowResp) ProtoReflect ¶
func (x *NowResp) ProtoReflect() protoreflect.Message
type SaveLinkReq ¶
type SaveLinkReq struct { Links []*subscribe.Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` // contains filtered or unexported fields }
func (*SaveLinkReq) Descriptor
deprecated
func (*SaveLinkReq) Descriptor() ([]byte, []int)
Deprecated: Use SaveLinkReq.ProtoReflect.Descriptor instead.
func (*SaveLinkReq) GetLinks ¶
func (x *SaveLinkReq) GetLinks() []*subscribe.Link
func (*SaveLinkReq) ProtoMessage ¶
func (*SaveLinkReq) ProtoMessage()
func (*SaveLinkReq) ProtoReflect ¶
func (x *SaveLinkReq) ProtoReflect() protoreflect.Message
func (*SaveLinkReq) Reset ¶
func (x *SaveLinkReq) Reset()
func (*SaveLinkReq) String ¶
func (x *SaveLinkReq) String() string
type SaveTagReq ¶
type SaveTagReq struct { Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` Type tag.TagType `protobuf:"varint,3,opt,name=type,proto3,enum=yuhaiin.tag.TagType" json:"type,omitempty"` Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*SaveTagReq) Descriptor
deprecated
func (*SaveTagReq) Descriptor() ([]byte, []int)
Deprecated: Use SaveTagReq.ProtoReflect.Descriptor instead.
func (*SaveTagReq) GetHash ¶
func (x *SaveTagReq) GetHash() string
func (*SaveTagReq) GetTag ¶
func (x *SaveTagReq) GetTag() string
func (*SaveTagReq) GetType ¶
func (x *SaveTagReq) GetType() tag.TagType
func (*SaveTagReq) ProtoMessage ¶
func (*SaveTagReq) ProtoMessage()
func (*SaveTagReq) ProtoReflect ¶
func (x *SaveTagReq) ProtoReflect() protoreflect.Message
func (*SaveTagReq) Reset ¶
func (x *SaveTagReq) Reset()
func (*SaveTagReq) String ¶
func (x *SaveTagReq) String() string
type SubscribeClient ¶
type SubscribeClient interface { Save(ctx context.Context, in *SaveLinkReq, opts ...grpc.CallOption) (*emptypb.Empty, error) Remove(ctx context.Context, in *LinkReq, opts ...grpc.CallOption) (*emptypb.Empty, error) Update(ctx context.Context, in *LinkReq, opts ...grpc.CallOption) (*emptypb.Empty, error) Get(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLinksResp, error) }
SubscribeClient is the client API for Subscribe 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 NewSubscribeClient ¶
func NewSubscribeClient(cc grpc.ClientConnInterface) SubscribeClient
type SubscribeServer ¶
type SubscribeServer interface { Save(context.Context, *SaveLinkReq) (*emptypb.Empty, error) Remove(context.Context, *LinkReq) (*emptypb.Empty, error) Update(context.Context, *LinkReq) (*emptypb.Empty, error) Get(context.Context, *emptypb.Empty) (*GetLinksResp, error) // contains filtered or unexported methods }
SubscribeServer is the server API for Subscribe service. All implementations must embed UnimplementedSubscribeServer for forward compatibility.
type TagClient ¶
type TagClient interface { Save(ctx context.Context, in *SaveTagReq, opts ...grpc.CallOption) (*emptypb.Empty, error) Remove(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) }
TagClient is the client API for Tag 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 NewTagClient ¶
func NewTagClient(cc grpc.ClientConnInterface) TagClient
type TagServer ¶
type TagServer interface { Save(context.Context, *SaveTagReq) (*emptypb.Empty, error) Remove(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) // contains filtered or unexported methods }
TagServer is the server API for Tag service. All implementations must embed UnimplementedTagServer for forward compatibility.
type UnimplementedNodeServer ¶
type UnimplementedNodeServer struct{}
UnimplementedNodeServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNodeServer) Get ¶
func (UnimplementedNodeServer) Get(context.Context, *wrapperspb.StringValue) (*point.Point, error)
func (UnimplementedNodeServer) Remove ¶
func (UnimplementedNodeServer) Remove(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
type UnimplementedSubscribeServer ¶
type UnimplementedSubscribeServer struct{}
UnimplementedSubscribeServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedSubscribeServer) Get ¶
func (UnimplementedSubscribeServer) Get(context.Context, *emptypb.Empty) (*GetLinksResp, error)
func (UnimplementedSubscribeServer) Save ¶
func (UnimplementedSubscribeServer) Save(context.Context, *SaveLinkReq) (*emptypb.Empty, error)
type UnimplementedTagServer ¶
type UnimplementedTagServer struct{}
UnimplementedTagServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedTagServer) Remove ¶
func (UnimplementedTagServer) Remove(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
func (UnimplementedTagServer) Save ¶
func (UnimplementedTagServer) Save(context.Context, *SaveTagReq) (*emptypb.Empty, error)
type UnsafeNodeServer ¶
type UnsafeNodeServer interface {
// contains filtered or unexported methods
}
UnsafeNodeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeServer will result in compilation errors.
type UnsafeSubscribeServer ¶
type UnsafeSubscribeServer interface {
// contains filtered or unexported methods
}
UnsafeSubscribeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SubscribeServer will result in compilation errors.
type UnsafeTagServer ¶
type UnsafeTagServer interface {
// contains filtered or unexported methods
}
UnsafeTagServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TagServer will result in compilation errors.
type UseReq ¶
type UseReq struct { Tcp bool `protobuf:"varint,1,opt,name=tcp,proto3" json:"tcp,omitempty"` Udp bool `protobuf:"varint,2,opt,name=udp,proto3" json:"udp,omitempty"` Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*UseReq) Descriptor
deprecated
func (*UseReq) ProtoMessage ¶
func (*UseReq) ProtoMessage()
func (*UseReq) ProtoReflect ¶
func (x *UseReq) ProtoReflect() protoreflect.Message