nodeGrpc

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_nodeServer_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Confirm.ProtoReflect.Descriptor instead.

func (*Confirm) GetConfirm

func (x *Confirm) GetConfirm() bool

func (*Confirm) ProtoMessage

func (*Confirm) ProtoMessage()

func (*Confirm) ProtoReflect

func (x *Confirm) ProtoReflect() protoreflect.Message

func (*Confirm) Reset

func (x *Confirm) Reset()

func (*Confirm) String

func (x *Confirm) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead.

func (*NodeInfo) GetAddr

func (x *NodeInfo) GetAddr() string

func (*NodeInfo) GetCpu

func (x *NodeInfo) GetCpu() float32

func (*NodeInfo) GetQueuenum

func (x *NodeInfo) GetQueuenum() int32

func (*NodeInfo) GetRam

func (x *NodeInfo) GetRam() float32

func (*NodeInfo) GetTimestamp

func (x *NodeInfo) GetTimestamp() int64

func (*NodeInfo) ProtoMessage

func (*NodeInfo) ProtoMessage()

func (*NodeInfo) ProtoReflect

func (x *NodeInfo) ProtoReflect() protoreflect.Message

func (*NodeInfo) Reset

func (x *NodeInfo) Reset()

func (*NodeInfo) String

func (x *NodeInfo) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use NodeIp.ProtoReflect.Descriptor instead.

func (*NodeIp) GetNodeip

func (x *NodeIp) GetNodeip() string

func (*NodeIp) GetTaskid

func (x *NodeIp) GetTaskid() string

func (*NodeIp) ProtoMessage

func (*NodeIp) ProtoMessage()

func (*NodeIp) ProtoReflect

func (x *NodeIp) ProtoReflect() protoreflect.Message

func (*NodeIp) Reset

func (x *NodeIp) Reset()

func (*NodeIp) String

func (x *NodeIp) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use NodeList.ProtoReflect.Descriptor instead.

func (*NodeList) GetNodes

func (x *NodeList) GetNodes() []*NodeInfo

func (*NodeList) ProtoMessage

func (*NodeList) ProtoMessage()

func (*NodeList) ProtoReflect

func (x *NodeList) ProtoReflect() protoreflect.Message

func (*NodeList) Reset

func (x *NodeList) Reset()

func (*NodeList) String

func (x *NodeList) String() string

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) TaskConfirm

func (UnimplementedNodeServerServer) TaskDispense

func (UnimplementedNodeServerServer) TaskDispenseByStream added in v0.1.2

func (UnimplementedNodeServerServer) TaskDivide

func (UnimplementedNodeServerServer) TaskError

func (UnimplementedNodeServerServer) WanderTask

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL