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 (*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 NodeServer_TaskDispenseByStreamClient
- type NodeServer_TaskDispenseByStreamServer
- type TaskBasicImf
- func (*TaskBasicImf) Descriptor() ([]byte, []int)deprecated
- func (x *TaskBasicImf) GetCommand() string
- func (x *TaskBasicImf) GetMaxhop() int32
- func (x *TaskBasicImf) GetPrenodeIp() string
- func (x *TaskBasicImf) GetSubmittime() int64
- 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) TaskDispenseByStream(NodeServer_TaskDispenseByStreamServer) error
- func (UnimplementedNodeServerServer) TaskDivide(context.Context, *TaskDivideImf) (*NodeInfo, error)
- func (UnimplementedNodeServerServer) TaskError(context.Context, *NodeIp) (*EmptyReply, error)
- func (UnimplementedNodeServerServer) WanderTask(context.Context, *TaskBasicImf) (*NodeInfo, error)
- type UnsafeNodeServerServer
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{ { StreamName: "TaskDispenseByStream", Handler: _NodeServer_TaskDispenseByStream_Handler, ClientStreams: true, }, }, 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"` Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*NodeInfo) Descriptor
deprecated
func (*NodeInfo) GetQueuenum ¶
func (*NodeInfo) GetTimestamp ¶
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) TaskDispenseByStream(ctx context.Context, opts ...grpc.CallOption) (NodeServer_TaskDispenseByStreamClient, 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 *TaskBasicImf, opts ...grpc.CallOption) (*NodeInfo, 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) TaskDispenseByStream(NodeServer_TaskDispenseByStreamServer) 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, *TaskBasicImf) (*NodeInfo, error) }
NodeServerServer is the server API for NodeServer service. All implementations should embed UnimplementedNodeServerServer for forward compatibility
type NodeServer_TaskDispenseByStreamClient ¶ added in v0.1.2
type NodeServer_TaskDispenseByStreamClient interface { Send(*TaskBasicImf) error CloseAndRecv() (*EmptyReply, error) grpc.ClientStream }
type NodeServer_TaskDispenseByStreamServer ¶ added in v0.1.2
type NodeServer_TaskDispenseByStreamServer interface { SendAndClose(*EmptyReply) error Recv() (*TaskBasicImf, error) grpc.ServerStream }
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"` Submittime int64 `protobuf:"varint,5,opt,name=submittime,proto3" json:"submittime,omitempty"` PrenodeIp string `protobuf:"bytes,6,opt,name=prenodeIp,proto3" json:"prenodeIp,omitempty"` Maxhop int32 `protobuf:"varint,7,opt,name=maxhop,proto3" json:"maxhop,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) GetMaxhop ¶
func (x *TaskBasicImf) GetMaxhop() int32
func (*TaskBasicImf) GetPrenodeIp ¶
func (x *TaskBasicImf) GetPrenodeIp() string
func (*TaskBasicImf) GetSubmittime ¶
func (x *TaskBasicImf) GetSubmittime() int64
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) TaskDispenseByStream ¶ added in v0.1.2
func (UnimplementedNodeServerServer) TaskDispenseByStream(NodeServer_TaskDispenseByStreamServer) 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 ¶
func (UnimplementedNodeServerServer) WanderTask(context.Context, *TaskBasicImf) (*NodeInfo, 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.