Documentation ¶
Index ¶
- Variables
- func RegisterNodeServerServer(s grpc.ServiceRegistrar, srv NodeServerServer)
- type Confirm
- type EmptyReply
- type NodeInfo
- func (*NodeInfo) Descriptor() ([]byte, []int)deprecated
- func (x *NodeInfo) GetAddr() string
- func (x *NodeInfo) GetCpu() float32
- func (x *NodeInfo) GetQueuenum() int32
- func (x *NodeInfo) GetRam() float32
- func (x *NodeInfo) GetTimestamp() int64
- func (x *NodeInfo) GetVisitnum() int32
- func (*NodeInfo) ProtoMessage()
- func (x *NodeInfo) ProtoReflect() protoreflect.Message
- func (x *NodeInfo) Reset()
- func (x *NodeInfo) String() string
- type NodeIp
- type NodeList
- type NodeServerClient
- type NodeServerServer
- type TaskBasicImf
- func (*TaskBasicImf) Descriptor() ([]byte, []int)deprecated
- func (x *TaskBasicImf) GetCommand() string
- func (x *TaskBasicImf) GetTaskcpu() float32
- func (x *TaskBasicImf) GetTaskid() string
- func (x *TaskBasicImf) GetTaskram() float32
- func (*TaskBasicImf) ProtoMessage()
- func (x *TaskBasicImf) ProtoReflect() protoreflect.Message
- func (x *TaskBasicImf) Reset()
- func (x *TaskBasicImf) String() string
- type TaskDivideImf
- func (*TaskDivideImf) Descriptor() ([]byte, []int)deprecated
- func (x *TaskDivideImf) GetBasicImf() *TaskBasicImf
- func (x *TaskDivideImf) GetTaskip() string
- func (x *TaskDivideImf) GetTimeout() int32
- func (*TaskDivideImf) ProtoMessage()
- func (x *TaskDivideImf) ProtoReflect() protoreflect.Message
- func (x *TaskDivideImf) Reset()
- func (x *TaskDivideImf) String() string
- type UnimplementedNodeServerServer
- func (UnimplementedNodeServerServer) HelloNode(context.Context, *EmptyReply) (*NodeList, error)
- func (UnimplementedNodeServerServer) TaskConfirm(context.Context, *NodeIp) (*Confirm, error)
- func (UnimplementedNodeServerServer) TaskDispense(context.Context, *TaskBasicImf) (*EmptyReply, error)
- func (UnimplementedNodeServerServer) TaskDivide(context.Context, *TaskDivideImf) (*NodeInfo, error)
- func (UnimplementedNodeServerServer) TaskError(context.Context, *NodeIp) (*EmptyReply, error)
- func (UnimplementedNodeServerServer) WanderTask(context.Context, *Wandertask) (*EmptyReply, error)
- type UnsafeNodeServerServer
- type Wandertask
- func (*Wandertask) Descriptor() ([]byte, []int)deprecated
- func (x *Wandertask) GetBasicImf() *TaskBasicImf
- func (x *Wandertask) GetPrenodeIp() string
- func (*Wandertask) ProtoMessage()
- func (x *Wandertask) ProtoReflect() protoreflect.Message
- func (x *Wandertask) Reset()
- func (x *Wandertask) String() string
Constants ¶
This section is empty.
Variables ¶
var File_nodeServer_proto protoreflect.FileDescriptor
var NodeServer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "nodeGrpc.NodeServer", HandlerType: (*NodeServerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TaskDispense", Handler: _NodeServer_TaskDispense_Handler, }, { MethodName: "TaskConfirm", Handler: _NodeServer_TaskConfirm_Handler, }, { MethodName: "TaskError", Handler: _NodeServer_TaskError_Handler, }, { MethodName: "TaskDivide", Handler: _NodeServer_TaskDivide_Handler, }, { MethodName: "HelloNode", Handler: _NodeServer_HelloNode_Handler, }, { MethodName: "WanderTask", Handler: _NodeServer_WanderTask_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "nodeServer.proto", }
NodeServer_ServiceDesc is the grpc.ServiceDesc for NodeServer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNodeServerServer ¶
func RegisterNodeServerServer(s grpc.ServiceRegistrar, srv NodeServerServer)
Types ¶
type Confirm ¶
type Confirm struct { Confirm bool `protobuf:"varint,1,opt,name=confirm,proto3" json:"confirm,omitempty"` // contains filtered or unexported fields }
func (*Confirm) Descriptor
deprecated
func (*Confirm) GetConfirm ¶
func (*Confirm) ProtoMessage ¶
func (*Confirm) ProtoMessage()
func (*Confirm) ProtoReflect ¶
func (x *Confirm) ProtoReflect() protoreflect.Message
type EmptyReply ¶
type EmptyReply struct {
// contains filtered or unexported fields
}
func (*EmptyReply) Descriptor
deprecated
func (*EmptyReply) Descriptor() ([]byte, []int)
Deprecated: Use EmptyReply.ProtoReflect.Descriptor instead.
func (*EmptyReply) ProtoMessage ¶
func (*EmptyReply) ProtoMessage()
func (*EmptyReply) ProtoReflect ¶
func (x *EmptyReply) ProtoReflect() protoreflect.Message
func (*EmptyReply) Reset ¶
func (x *EmptyReply) Reset()
func (*EmptyReply) String ¶
func (x *EmptyReply) String() string
type NodeInfo ¶
type NodeInfo struct { Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` Cpu float32 `protobuf:"fixed32,2,opt,name=cpu,proto3" json:"cpu,omitempty"` Ram float32 `protobuf:"fixed32,3,opt,name=ram,proto3" json:"ram,omitempty"` Queuenum int32 `protobuf:"varint,4,opt,name=queuenum,proto3" json:"queuenum,omitempty"` Visitnum int32 `protobuf:"varint,5,opt,name=visitnum,proto3" json:"visitnum,omitempty"` Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*NodeInfo) Descriptor
deprecated
func (*NodeInfo) GetQueuenum ¶
func (*NodeInfo) GetTimestamp ¶
func (*NodeInfo) GetVisitnum ¶
func (*NodeInfo) ProtoMessage ¶
func (*NodeInfo) ProtoMessage()
func (*NodeInfo) ProtoReflect ¶
func (x *NodeInfo) ProtoReflect() protoreflect.Message
type NodeIp ¶
type NodeIp struct { Taskid string `protobuf:"bytes,1,opt,name=taskid,proto3" json:"taskid,omitempty"` Nodeip string `protobuf:"bytes,2,opt,name=nodeip,proto3" json:"nodeip,omitempty"` // contains filtered or unexported fields }
func (*NodeIp) Descriptor
deprecated
func (*NodeIp) ProtoMessage ¶
func (*NodeIp) ProtoMessage()
func (*NodeIp) ProtoReflect ¶
func (x *NodeIp) ProtoReflect() protoreflect.Message
type NodeList ¶
type NodeList struct { Nodes []*NodeInfo `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` // contains filtered or unexported fields }
func (*NodeList) Descriptor
deprecated
func (*NodeList) ProtoMessage ¶
func (*NodeList) ProtoMessage()
func (*NodeList) ProtoReflect ¶
func (x *NodeList) ProtoReflect() protoreflect.Message
type NodeServerClient ¶
type NodeServerClient interface { TaskDispense(ctx context.Context, in *TaskBasicImf, opts ...grpc.CallOption) (*EmptyReply, error) TaskConfirm(ctx context.Context, in *NodeIp, opts ...grpc.CallOption) (*Confirm, error) TaskError(ctx context.Context, in *NodeIp, opts ...grpc.CallOption) (*EmptyReply, error) TaskDivide(ctx context.Context, in *TaskDivideImf, opts ...grpc.CallOption) (*NodeInfo, error) HelloNode(ctx context.Context, in *EmptyReply, opts ...grpc.CallOption) (*NodeList, error) WanderTask(ctx context.Context, in *Wandertask, opts ...grpc.CallOption) (*EmptyReply, error) }
NodeServerClient is the client API for NodeServer 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 NewNodeServerClient ¶
func NewNodeServerClient(cc grpc.ClientConnInterface) NodeServerClient
type NodeServerServer ¶
type NodeServerServer interface { TaskDispense(context.Context, *TaskBasicImf) (*EmptyReply, error) TaskConfirm(context.Context, *NodeIp) (*Confirm, error) TaskError(context.Context, *NodeIp) (*EmptyReply, error) TaskDivide(context.Context, *TaskDivideImf) (*NodeInfo, error) HelloNode(context.Context, *EmptyReply) (*NodeList, error) WanderTask(context.Context, *Wandertask) (*EmptyReply, error) }
NodeServerServer is the server API for NodeServer service. All implementations should embed UnimplementedNodeServerServer for forward compatibility
type TaskBasicImf ¶
type TaskBasicImf struct { Taskid string `protobuf:"bytes,1,opt,name=taskid,proto3" json:"taskid,omitempty"` Taskram float32 `protobuf:"fixed32,2,opt,name=taskram,proto3" json:"taskram,omitempty"` Taskcpu float32 `protobuf:"fixed32,3,opt,name=taskcpu,proto3" json:"taskcpu,omitempty"` Command string `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"` // contains filtered or unexported fields }
func (*TaskBasicImf) Descriptor
deprecated
func (*TaskBasicImf) Descriptor() ([]byte, []int)
Deprecated: Use TaskBasicImf.ProtoReflect.Descriptor instead.
func (*TaskBasicImf) GetCommand ¶
func (x *TaskBasicImf) GetCommand() string
func (*TaskBasicImf) GetTaskcpu ¶
func (x *TaskBasicImf) GetTaskcpu() float32
func (*TaskBasicImf) GetTaskid ¶
func (x *TaskBasicImf) GetTaskid() string
func (*TaskBasicImf) GetTaskram ¶
func (x *TaskBasicImf) GetTaskram() float32
func (*TaskBasicImf) ProtoMessage ¶
func (*TaskBasicImf) ProtoMessage()
func (*TaskBasicImf) ProtoReflect ¶
func (x *TaskBasicImf) ProtoReflect() protoreflect.Message
func (*TaskBasicImf) Reset ¶
func (x *TaskBasicImf) Reset()
func (*TaskBasicImf) String ¶
func (x *TaskBasicImf) String() string
type TaskDivideImf ¶
type TaskDivideImf struct { BasicImf *TaskBasicImf `protobuf:"bytes,1,opt,name=BasicImf,proto3" json:"BasicImf,omitempty"` Taskip string `protobuf:"bytes,2,opt,name=taskip,proto3" json:"taskip,omitempty"` Timeout int32 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*TaskDivideImf) Descriptor
deprecated
func (*TaskDivideImf) Descriptor() ([]byte, []int)
Deprecated: Use TaskDivideImf.ProtoReflect.Descriptor instead.
func (*TaskDivideImf) GetBasicImf ¶
func (x *TaskDivideImf) GetBasicImf() *TaskBasicImf
func (*TaskDivideImf) GetTaskip ¶
func (x *TaskDivideImf) GetTaskip() string
func (*TaskDivideImf) GetTimeout ¶
func (x *TaskDivideImf) GetTimeout() int32
func (*TaskDivideImf) ProtoMessage ¶
func (*TaskDivideImf) ProtoMessage()
func (*TaskDivideImf) ProtoReflect ¶
func (x *TaskDivideImf) ProtoReflect() protoreflect.Message
func (*TaskDivideImf) Reset ¶
func (x *TaskDivideImf) Reset()
func (*TaskDivideImf) String ¶
func (x *TaskDivideImf) String() string
type UnimplementedNodeServerServer ¶
type UnimplementedNodeServerServer struct { }
UnimplementedNodeServerServer should be embedded to have forward compatible implementations.
func (UnimplementedNodeServerServer) HelloNode ¶
func (UnimplementedNodeServerServer) HelloNode(context.Context, *EmptyReply) (*NodeList, error)
func (UnimplementedNodeServerServer) TaskConfirm ¶
func (UnimplementedNodeServerServer) TaskDispense ¶
func (UnimplementedNodeServerServer) TaskDispense(context.Context, *TaskBasicImf) (*EmptyReply, error)
func (UnimplementedNodeServerServer) TaskDivide ¶
func (UnimplementedNodeServerServer) TaskDivide(context.Context, *TaskDivideImf) (*NodeInfo, error)
func (UnimplementedNodeServerServer) TaskError ¶
func (UnimplementedNodeServerServer) TaskError(context.Context, *NodeIp) (*EmptyReply, error)
func (UnimplementedNodeServerServer) WanderTask ¶ added in v0.1.3
func (UnimplementedNodeServerServer) WanderTask(context.Context, *Wandertask) (*EmptyReply, error)
type UnsafeNodeServerServer ¶
type UnsafeNodeServerServer interface {
// contains filtered or unexported methods
}
UnsafeNodeServerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeServerServer will result in compilation errors.
type Wandertask ¶ added in v0.1.3
type Wandertask struct { BasicImf *TaskBasicImf `protobuf:"bytes,1,opt,name=BasicImf,proto3" json:"BasicImf,omitempty"` PrenodeIp string `protobuf:"bytes,2,opt,name=prenodeIp,proto3" json:"prenodeIp,omitempty"` // contains filtered or unexported fields }
func (*Wandertask) Descriptor
deprecated
added in
v0.1.3
func (*Wandertask) Descriptor() ([]byte, []int)
Deprecated: Use Wandertask.ProtoReflect.Descriptor instead.
func (*Wandertask) GetBasicImf ¶ added in v0.1.3
func (x *Wandertask) GetBasicImf() *TaskBasicImf
func (*Wandertask) GetPrenodeIp ¶ added in v0.1.3
func (x *Wandertask) GetPrenodeIp() string
func (*Wandertask) ProtoMessage ¶ added in v0.1.3
func (*Wandertask) ProtoMessage()
func (*Wandertask) ProtoReflect ¶ added in v0.1.3
func (x *Wandertask) ProtoReflect() protoreflect.Message
func (*Wandertask) Reset ¶ added in v0.1.3
func (x *Wandertask) Reset()
func (*Wandertask) String ¶ added in v0.1.3
func (x *Wandertask) String() string