Documentation ¶
Index ¶
- 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 NowReq
- type NowReqNetType
- func (NowReqNetType) Descriptor() protoreflect.EnumDescriptor
- func (x NowReqNetType) Enum() *NowReqNetType
- func (NowReqNetType) EnumDescriptor() ([]byte, []int)deprecated
- func (x NowReqNetType) Number() protoreflect.EnumNumber
- func (x NowReqNetType) String() string
- func (NowReqNetType) Type() protoreflect.EnumType
- type SaveLinkReq
- type SaveTagReq
- 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, *wrapperspb.StringValue) (*node.Manager, error)
- func (UnimplementedNodeServer) Now(context.Context, *NowReq) (*point.Point, 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 ¶
This section is empty.
Variables ¶
var ( NowReqNetType_name = map[int32]string{ 0: "reserve", 1: "tcp", 2: "udp", } NowReqNetType_value = map[string]int32{ "reserve": 0, "tcp": 1, "udp": 2, } )
Enum value maps for NowReqNetType.
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 *NowReq, opts ...grpc.CallOption) (*point.Point, 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 *wrapperspb.StringValue, 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, *NowReq) (*point.Point, 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, *wrapperspb.StringValue) (*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 NowReq ¶
type NowReq struct { Net NowReqNetType `protobuf:"varint,1,opt,name=net,json=type,proto3,enum=yuhaiin.protos.node.service.NowReqNetType" json:"net,omitempty"` // contains filtered or unexported fields }
func (*NowReq) Descriptor
deprecated
func (*NowReq) GetNet ¶
func (x *NowReq) GetNet() NowReqNetType
func (*NowReq) ProtoMessage ¶
func (*NowReq) ProtoMessage()
func (*NowReq) ProtoReflect ¶
func (x *NowReq) ProtoReflect() protoreflect.Message
type NowReqNetType ¶
type NowReqNetType int32
const ( NowReq_reserve NowReqNetType = 0 NowReq_tcp NowReqNetType = 1 NowReq_udp NowReqNetType = 2 )
func (NowReqNetType) Descriptor ¶
func (NowReqNetType) Descriptor() protoreflect.EnumDescriptor
func (NowReqNetType) Enum ¶
func (x NowReqNetType) Enum() *NowReqNetType
func (NowReqNetType) EnumDescriptor
deprecated
func (NowReqNetType) EnumDescriptor() ([]byte, []int)
Deprecated: Use NowReqNetType.Descriptor instead.
func (NowReqNetType) Number ¶
func (x NowReqNetType) Number() protoreflect.EnumNumber
func (NowReqNetType) String ¶
func (x NowReqNetType) String() string
func (NowReqNetType) Type ¶
func (NowReqNetType) Type() protoreflect.EnumType
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"` 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) 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.
func (UnimplementedNodeServer) Get ¶
func (UnimplementedNodeServer) Get(context.Context, *wrapperspb.StringValue) (*point.Point, error)
func (UnimplementedNodeServer) Manager ¶
func (UnimplementedNodeServer) Manager(context.Context, *wrapperspb.StringValue) (*node.Manager, 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.
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.
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