nodeGrpc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 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,
		},
	},
	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) 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"`
	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) 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) GetVisitnum

func (x *NodeInfo) GetVisitnum() int32

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)
	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) (*NodeList, error)
	HelloNode(ctx context.Context, in *EmptyReply, opts ...grpc.CallOption) (*NodeList, 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) (*NodeList, error)
	HelloNode(context.Context, *EmptyReply) (*NodeList, 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"`
	Retrynum *int32  `protobuf:"varint,5,opt,name=retrynum,proto3,oneof" json:"retrynum,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) GetRetrynum added in v0.1.2

func (x *TaskBasicImf) GetRetrynum() int32

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

func (UnimplementedNodeServerServer) TaskError

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