Commit 324b120f authored by vicotor's avatar vicotor

update proto

parent 46ec7d60
......@@ -6,7 +6,7 @@ package nodemanagerv1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
_ "github.com/odysseus/odysseus-protocol/gen/proto/go/base/v1"
v1 "github.com/odysseus/odysseus-protocol/gen/proto/go/base/v1"
math "math"
)
......@@ -21,12 +21,42 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type TaskType int32
const (
TaskType_SystemTask TaskType = 0
TaskType_UserTask TaskType = 1
TaskType_CustomTask TaskType = 2
)
var TaskType_name = map[int32]string{
0: "SystemTask",
1: "UserTask",
2: "CustomTask",
}
var TaskType_value = map[string]int32{
"SystemTask": 0,
"UserTask": 1,
"CustomTask": 2,
}
func (x TaskType) String() string {
return proto.EnumName(TaskType_name, int32(x))
}
func (TaskType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{0}
}
type WorkerMessage struct {
// Types that are valid to be assigned to Message:
//
// *WorkerMessage_HeartbeatResponse
// *WorkerMessage_SubmitTaskResult
// *WorkerMessage_StatusResp
// *WorkerMessage_Status
// *WorkerMessage_DeviceInfo
// *WorkerMessage_DeviceUsage
// *WorkerMessage_GoodbyeMessage
Message isWorkerMessage_Message `protobuf_oneof:"message"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -67,13 +97,25 @@ type WorkerMessage_HeartbeatResponse struct {
type WorkerMessage_SubmitTaskResult struct {
SubmitTaskResult *SubmitTaskResult `protobuf:"bytes,2,opt,name=submit_task_result,json=submitTaskResult,proto3,oneof" json:"submit_task_result,omitempty"`
}
type WorkerMessage_StatusResp struct {
StatusResp *StatusResp `protobuf:"bytes,3,opt,name=status_resp,json=statusResp,proto3,oneof" json:"status_resp,omitempty"`
type WorkerMessage_Status struct {
Status *StatusResponse `protobuf:"bytes,3,opt,name=status,proto3,oneof" json:"status,omitempty"`
}
type WorkerMessage_DeviceInfo struct {
DeviceInfo *DeviceInfoResponse `protobuf:"bytes,4,opt,name=device_info,json=deviceInfo,proto3,oneof" json:"device_info,omitempty"`
}
type WorkerMessage_DeviceUsage struct {
DeviceUsage *DeviceUsageResponse `protobuf:"bytes,5,opt,name=device_usage,json=deviceUsage,proto3,oneof" json:"device_usage,omitempty"`
}
type WorkerMessage_GoodbyeMessage struct {
GoodbyeMessage *GoodbyeMessage `protobuf:"bytes,6,opt,name=goodbye_message,json=goodbyeMessage,proto3,oneof" json:"goodbye_message,omitempty"`
}
func (*WorkerMessage_HeartbeatResponse) isWorkerMessage_Message() {}
func (*WorkerMessage_SubmitTaskResult) isWorkerMessage_Message() {}
func (*WorkerMessage_StatusResp) isWorkerMessage_Message() {}
func (*WorkerMessage_Status) isWorkerMessage_Message() {}
func (*WorkerMessage_DeviceInfo) isWorkerMessage_Message() {}
func (*WorkerMessage_DeviceUsage) isWorkerMessage_Message() {}
func (*WorkerMessage_GoodbyeMessage) isWorkerMessage_Message() {}
func (m *WorkerMessage) GetMessage() isWorkerMessage_Message {
if m != nil {
......@@ -96,9 +138,30 @@ func (m *WorkerMessage) GetSubmitTaskResult() *SubmitTaskResult {
return nil
}
func (m *WorkerMessage) GetStatusResp() *StatusResp {
if x, ok := m.GetMessage().(*WorkerMessage_StatusResp); ok {
return x.StatusResp
func (m *WorkerMessage) GetStatus() *StatusResponse {
if x, ok := m.GetMessage().(*WorkerMessage_Status); ok {
return x.Status
}
return nil
}
func (m *WorkerMessage) GetDeviceInfo() *DeviceInfoResponse {
if x, ok := m.GetMessage().(*WorkerMessage_DeviceInfo); ok {
return x.DeviceInfo
}
return nil
}
func (m *WorkerMessage) GetDeviceUsage() *DeviceUsageResponse {
if x, ok := m.GetMessage().(*WorkerMessage_DeviceUsage); ok {
return x.DeviceUsage
}
return nil
}
func (m *WorkerMessage) GetGoodbyeMessage() *GoodbyeMessage {
if x, ok := m.GetMessage().(*WorkerMessage_GoodbyeMessage); ok {
return x.GoodbyeMessage
}
return nil
}
......@@ -108,16 +171,22 @@ func (*WorkerMessage) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*WorkerMessage_HeartbeatResponse)(nil),
(*WorkerMessage_SubmitTaskResult)(nil),
(*WorkerMessage_StatusResp)(nil),
(*WorkerMessage_Status)(nil),
(*WorkerMessage_DeviceInfo)(nil),
(*WorkerMessage_DeviceUsage)(nil),
(*WorkerMessage_GoodbyeMessage)(nil),
}
}
type ManagerMessage struct {
// Types that are valid to be assigned to Message:
//
// *ManagerMessage_HeartbeatRequest
// *ManagerMessage_PushTaskMessage
// *ManagerMessage_ProofTaskResult
// *ManagerMessage_StatusRequest
// *ManagerMessage_DeviceRequest
// *ManagerMessage_DeviceUsage
// *ManagerMessage_GoodbyeMessage
Message isManagerMessage_Message `protobuf_oneof:"message"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -161,10 +230,26 @@ type ManagerMessage_PushTaskMessage struct {
type ManagerMessage_ProofTaskResult struct {
ProofTaskResult *ProofTaskResult `protobuf:"bytes,3,opt,name=proof_task_result,json=proofTaskResult,proto3,oneof" json:"proof_task_result,omitempty"`
}
type ManagerMessage_StatusRequest struct {
StatusRequest *StatusRequest `protobuf:"bytes,4,opt,name=status_request,json=statusRequest,proto3,oneof" json:"status_request,omitempty"`
}
type ManagerMessage_DeviceRequest struct {
DeviceRequest *DeviceInfoRequest `protobuf:"bytes,5,opt,name=device_request,json=deviceRequest,proto3,oneof" json:"device_request,omitempty"`
}
type ManagerMessage_DeviceUsage struct {
DeviceUsage *DeviceUsageRequest `protobuf:"bytes,6,opt,name=device_usage,json=deviceUsage,proto3,oneof" json:"device_usage,omitempty"`
}
type ManagerMessage_GoodbyeMessage struct {
GoodbyeMessage *GoodbyeMessage `protobuf:"bytes,7,opt,name=goodbye_message,json=goodbyeMessage,proto3,oneof" json:"goodbye_message,omitempty"`
}
func (*ManagerMessage_HeartbeatRequest) isManagerMessage_Message() {}
func (*ManagerMessage_PushTaskMessage) isManagerMessage_Message() {}
func (*ManagerMessage_ProofTaskResult) isManagerMessage_Message() {}
func (*ManagerMessage_StatusRequest) isManagerMessage_Message() {}
func (*ManagerMessage_DeviceRequest) isManagerMessage_Message() {}
func (*ManagerMessage_DeviceUsage) isManagerMessage_Message() {}
func (*ManagerMessage_GoodbyeMessage) isManagerMessage_Message() {}
func (m *ManagerMessage) GetMessage() isManagerMessage_Message {
if m != nil {
......@@ -194,16 +279,87 @@ func (m *ManagerMessage) GetProofTaskResult() *ProofTaskResult {
return nil
}
func (m *ManagerMessage) GetStatusRequest() *StatusRequest {
if x, ok := m.GetMessage().(*ManagerMessage_StatusRequest); ok {
return x.StatusRequest
}
return nil
}
func (m *ManagerMessage) GetDeviceRequest() *DeviceInfoRequest {
if x, ok := m.GetMessage().(*ManagerMessage_DeviceRequest); ok {
return x.DeviceRequest
}
return nil
}
func (m *ManagerMessage) GetDeviceUsage() *DeviceUsageRequest {
if x, ok := m.GetMessage().(*ManagerMessage_DeviceUsage); ok {
return x.DeviceUsage
}
return nil
}
func (m *ManagerMessage) GetGoodbyeMessage() *GoodbyeMessage {
if x, ok := m.GetMessage().(*ManagerMessage_GoodbyeMessage); ok {
return x.GoodbyeMessage
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*ManagerMessage) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*ManagerMessage_HeartbeatRequest)(nil),
(*ManagerMessage_PushTaskMessage)(nil),
(*ManagerMessage_ProofTaskResult)(nil),
(*ManagerMessage_StatusRequest)(nil),
(*ManagerMessage_DeviceRequest)(nil),
(*ManagerMessage_DeviceUsage)(nil),
(*ManagerMessage_GoodbyeMessage)(nil),
}
}
type GoodbyeMessage struct {
Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GoodbyeMessage) Reset() { *m = GoodbyeMessage{} }
func (m *GoodbyeMessage) String() string { return proto.CompactTextString(m) }
func (*GoodbyeMessage) ProtoMessage() {}
func (*GoodbyeMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{2}
}
func (m *GoodbyeMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GoodbyeMessage.Unmarshal(m, b)
}
func (m *GoodbyeMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GoodbyeMessage.Marshal(b, m, deterministic)
}
func (m *GoodbyeMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_GoodbyeMessage.Merge(m, src)
}
func (m *GoodbyeMessage) XXX_Size() int {
return xxx_messageInfo_GoodbyeMessage.Size(m)
}
func (m *GoodbyeMessage) XXX_DiscardUnknown() {
xxx_messageInfo_GoodbyeMessage.DiscardUnknown(m)
}
var xxx_messageInfo_GoodbyeMessage proto.InternalMessageInfo
func (m *GoodbyeMessage) GetReason() string {
if m != nil {
return m.Reason
}
return ""
}
type HeartbeatRequest struct {
Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -213,7 +369,7 @@ func (m *HeartbeatRequest) Reset() { *m = HeartbeatRequest{} }
func (m *HeartbeatRequest) String() string { return proto.CompactTextString(m) }
func (*HeartbeatRequest) ProtoMessage() {}
func (*HeartbeatRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{2}
return fileDescriptor_810ae261dc8e2975, []int{3}
}
func (m *HeartbeatRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HeartbeatRequest.Unmarshal(m, b)
......@@ -233,7 +389,15 @@ func (m *HeartbeatRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_HeartbeatRequest proto.InternalMessageInfo
func (m *HeartbeatRequest) GetTimestamp() uint64 {
if m != nil {
return m.Timestamp
}
return 0
}
type HeartbeatResponse struct {
Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -243,7 +407,7 @@ func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} }
func (m *HeartbeatResponse) String() string { return proto.CompactTextString(m) }
func (*HeartbeatResponse) ProtoMessage() {}
func (*HeartbeatResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{3}
return fileDescriptor_810ae261dc8e2975, []int{4}
}
func (m *HeartbeatResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HeartbeatResponse.Unmarshal(m, b)
......@@ -263,53 +427,269 @@ func (m *HeartbeatResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_HeartbeatResponse proto.InternalMessageInfo
type StatusResp struct {
RemainPower uint64 `protobuf:"varint,1,opt,name=remain_power,json=remainPower,proto3" json:"remain_power,omitempty"`
RemainDevice uint64 `protobuf:"varint,2,opt,name=remain_device,json=remainDevice,proto3" json:"remain_device,omitempty"`
func (m *HeartbeatResponse) GetTimestamp() uint64 {
if m != nil {
return m.Timestamp
}
return 0
}
type StatusRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StatusResp) Reset() { *m = StatusResp{} }
func (m *StatusResp) String() string { return proto.CompactTextString(m) }
func (*StatusResp) ProtoMessage() {}
func (*StatusResp) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{4}
func (m *StatusRequest) Reset() { *m = StatusRequest{} }
func (m *StatusRequest) String() string { return proto.CompactTextString(m) }
func (*StatusRequest) ProtoMessage() {}
func (*StatusRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{5}
}
func (m *StatusRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatusRequest.Unmarshal(m, b)
}
func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatusRequest.Marshal(b, m, deterministic)
}
func (m *StatusRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatusRequest.Merge(m, src)
}
func (m *StatusRequest) XXX_Size() int {
return xxx_messageInfo_StatusRequest.Size(m)
}
func (m *StatusRequest) XXX_DiscardUnknown() {
xxx_messageInfo_StatusRequest.DiscardUnknown(m)
}
var xxx_messageInfo_StatusRequest proto.InternalMessageInfo
type DeviceUsageRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeviceUsageRequest) Reset() { *m = DeviceUsageRequest{} }
func (m *DeviceUsageRequest) String() string { return proto.CompactTextString(m) }
func (*DeviceUsageRequest) ProtoMessage() {}
func (*DeviceUsageRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{6}
}
func (m *DeviceUsageRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceUsageRequest.Unmarshal(m, b)
}
func (m *DeviceUsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeviceUsageRequest.Marshal(b, m, deterministic)
}
func (m *DeviceUsageRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceUsageRequest.Merge(m, src)
}
func (m *DeviceUsageRequest) XXX_Size() int {
return xxx_messageInfo_DeviceUsageRequest.Size(m)
}
func (m *DeviceUsageRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceUsageRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeviceUsageRequest proto.InternalMessageInfo
type DeviceUsageResponse struct {
Usage []*DeviceUsage `protobuf:"bytes,1,rep,name=usage,proto3" json:"usage,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeviceUsageResponse) Reset() { *m = DeviceUsageResponse{} }
func (m *DeviceUsageResponse) String() string { return proto.CompactTextString(m) }
func (*DeviceUsageResponse) ProtoMessage() {}
func (*DeviceUsageResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{7}
}
func (m *StatusResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatusResp.Unmarshal(m, b)
func (m *DeviceUsageResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceUsageResponse.Unmarshal(m, b)
}
func (m *StatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatusResp.Marshal(b, m, deterministic)
func (m *DeviceUsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeviceUsageResponse.Marshal(b, m, deterministic)
}
func (m *StatusResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatusResp.Merge(m, src)
func (m *DeviceUsageResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceUsageResponse.Merge(m, src)
}
func (m *StatusResp) XXX_Size() int {
return xxx_messageInfo_StatusResp.Size(m)
func (m *DeviceUsageResponse) XXX_Size() int {
return xxx_messageInfo_DeviceUsageResponse.Size(m)
}
func (m *StatusResp) XXX_DiscardUnknown() {
xxx_messageInfo_StatusResp.DiscardUnknown(m)
func (m *DeviceUsageResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceUsageResponse.DiscardUnknown(m)
}
var xxx_messageInfo_StatusResp proto.InternalMessageInfo
var xxx_messageInfo_DeviceUsageResponse proto.InternalMessageInfo
func (m *StatusResp) GetRemainPower() uint64 {
func (m *DeviceUsageResponse) GetUsage() []*DeviceUsage {
if m != nil {
return m.RemainPower
return m.Usage
}
return 0
return nil
}
type DeviceInfoRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeviceInfoRequest) Reset() { *m = DeviceInfoRequest{} }
func (m *DeviceInfoRequest) String() string { return proto.CompactTextString(m) }
func (*DeviceInfoRequest) ProtoMessage() {}
func (*DeviceInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{8}
}
func (m *DeviceInfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceInfoRequest.Unmarshal(m, b)
}
func (m *DeviceInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeviceInfoRequest.Marshal(b, m, deterministic)
}
func (m *DeviceInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceInfoRequest.Merge(m, src)
}
func (m *DeviceInfoRequest) XXX_Size() int {
return xxx_messageInfo_DeviceInfoRequest.Size(m)
}
func (m *DeviceInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeviceInfoRequest proto.InternalMessageInfo
type DeviceInfoResponse struct {
Devices []*DeviceInfo `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeviceInfoResponse) Reset() { *m = DeviceInfoResponse{} }
func (m *DeviceInfoResponse) String() string { return proto.CompactTextString(m) }
func (*DeviceInfoResponse) ProtoMessage() {}
func (*DeviceInfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{9}
}
func (m *DeviceInfoResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceInfoResponse.Unmarshal(m, b)
}
func (m *DeviceInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeviceInfoResponse.Marshal(b, m, deterministic)
}
func (m *DeviceInfoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceInfoResponse.Merge(m, src)
}
func (m *DeviceInfoResponse) XXX_Size() int {
return xxx_messageInfo_DeviceInfoResponse.Size(m)
}
func (m *DeviceInfoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceInfoResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DeviceInfoResponse proto.InternalMessageInfo
func (m *StatusResp) GetRemainDevice() uint64 {
func (m *DeviceInfoResponse) GetDevices() []*DeviceInfo {
if m != nil {
return m.RemainDevice
return m.Devices
}
return nil
}
type DeviceUsage struct {
DeviceType string `protobuf:"bytes,1,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
DeviceUsage uint64 `protobuf:"varint,2,opt,name=device_usage,json=deviceUsage,proto3" json:"device_usage,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeviceUsage) Reset() { *m = DeviceUsage{} }
func (m *DeviceUsage) String() string { return proto.CompactTextString(m) }
func (*DeviceUsage) ProtoMessage() {}
func (*DeviceUsage) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{10}
}
func (m *DeviceUsage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceUsage.Unmarshal(m, b)
}
func (m *DeviceUsage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeviceUsage.Marshal(b, m, deterministic)
}
func (m *DeviceUsage) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceUsage.Merge(m, src)
}
func (m *DeviceUsage) XXX_Size() int {
return xxx_messageInfo_DeviceUsage.Size(m)
}
func (m *DeviceUsage) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceUsage.DiscardUnknown(m)
}
var xxx_messageInfo_DeviceUsage proto.InternalMessageInfo
func (m *DeviceUsage) GetDeviceType() string {
if m != nil {
return m.DeviceType
}
return ""
}
func (m *DeviceUsage) GetDeviceUsage() uint64 {
if m != nil {
return m.DeviceUsage
}
return 0
}
type StatusResponse struct {
DeviceStatus []byte `protobuf:"bytes,1,opt,name=device_status,json=deviceStatus,proto3" json:"device_status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StatusResponse) Reset() { *m = StatusResponse{} }
func (m *StatusResponse) String() string { return proto.CompactTextString(m) }
func (*StatusResponse) ProtoMessage() {}
func (*StatusResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{11}
}
func (m *StatusResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatusResponse.Unmarshal(m, b)
}
func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatusResponse.Marshal(b, m, deterministic)
}
func (m *StatusResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatusResponse.Merge(m, src)
}
func (m *StatusResponse) XXX_Size() int {
return xxx_messageInfo_StatusResponse.Size(m)
}
func (m *StatusResponse) XXX_DiscardUnknown() {
xxx_messageInfo_StatusResponse.DiscardUnknown(m)
}
var xxx_messageInfo_StatusResponse proto.InternalMessageInfo
func (m *StatusResponse) GetDeviceStatus() []byte {
if m != nil {
return m.DeviceStatus
}
return nil
}
type PushTaskMessage struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
TaskType TaskType `protobuf:"varint,2,opt,name=task_type,json=taskType,proto3,enum=nodemanager.v1.TaskType" json:"task_type,omitempty"`
WorkLoad uint64 `protobuf:"varint,3,opt,name=work_load,json=workLoad,proto3" json:"work_load,omitempty"`
TaskCmd string `protobuf:"bytes,4,opt,name=task_cmd,json=taskCmd,proto3" json:"task_cmd,omitempty"`
TaskParam []byte `protobuf:"bytes,5,opt,name=task_param,json=taskParam,proto3" json:"task_param,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -319,7 +699,7 @@ func (m *PushTaskMessage) Reset() { *m = PushTaskMessage{} }
func (m *PushTaskMessage) String() string { return proto.CompactTextString(m) }
func (*PushTaskMessage) ProtoMessage() {}
func (*PushTaskMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{5}
return fileDescriptor_810ae261dc8e2975, []int{12}
}
func (m *PushTaskMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PushTaskMessage.Unmarshal(m, b)
......@@ -339,7 +719,46 @@ func (m *PushTaskMessage) XXX_DiscardUnknown() {
var xxx_messageInfo_PushTaskMessage proto.InternalMessageInfo
func (m *PushTaskMessage) GetTaskId() string {
if m != nil {
return m.TaskId
}
return ""
}
func (m *PushTaskMessage) GetTaskType() TaskType {
if m != nil {
return m.TaskType
}
return TaskType_SystemTask
}
func (m *PushTaskMessage) GetWorkLoad() uint64 {
if m != nil {
return m.WorkLoad
}
return 0
}
func (m *PushTaskMessage) GetTaskCmd() string {
if m != nil {
return m.TaskCmd
}
return ""
}
func (m *PushTaskMessage) GetTaskParam() []byte {
if m != nil {
return m.TaskParam
}
return nil
}
type SubmitTaskResult struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
TaskProof []byte `protobuf:"bytes,2,opt,name=task_proof,json=taskProof,proto3" json:"task_proof,omitempty"`
WorkerSignature []byte `protobuf:"bytes,3,opt,name=worker_signature,json=workerSignature,proto3" json:"worker_signature,omitempty"`
TaskResult []byte `protobuf:"bytes,4,opt,name=task_result,json=taskResult,proto3" json:"task_result,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -349,7 +768,7 @@ func (m *SubmitTaskResult) Reset() { *m = SubmitTaskResult{} }
func (m *SubmitTaskResult) String() string { return proto.CompactTextString(m) }
func (*SubmitTaskResult) ProtoMessage() {}
func (*SubmitTaskResult) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{6}
return fileDescriptor_810ae261dc8e2975, []int{13}
}
func (m *SubmitTaskResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SubmitTaskResult.Unmarshal(m, b)
......@@ -369,7 +788,37 @@ func (m *SubmitTaskResult) XXX_DiscardUnknown() {
var xxx_messageInfo_SubmitTaskResult proto.InternalMessageInfo
func (m *SubmitTaskResult) GetTaskId() string {
if m != nil {
return m.TaskId
}
return ""
}
func (m *SubmitTaskResult) GetTaskProof() []byte {
if m != nil {
return m.TaskProof
}
return nil
}
func (m *SubmitTaskResult) GetWorkerSignature() []byte {
if m != nil {
return m.WorkerSignature
}
return nil
}
func (m *SubmitTaskResult) GetTaskResult() []byte {
if m != nil {
return m.TaskResult
}
return nil
}
type ProofTaskResult struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
ManagerSignature []byte `protobuf:"bytes,2,opt,name=manager_signature,json=managerSignature,proto3" json:"manager_signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -379,7 +828,7 @@ func (m *ProofTaskResult) Reset() { *m = ProofTaskResult{} }
func (m *ProofTaskResult) String() string { return proto.CompactTextString(m) }
func (*ProofTaskResult) ProtoMessage() {}
func (*ProofTaskResult) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{7}
return fileDescriptor_810ae261dc8e2975, []int{14}
}
func (m *ProofTaskResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProofTaskResult.Unmarshal(m, b)
......@@ -399,10 +848,25 @@ func (m *ProofTaskResult) XXX_DiscardUnknown() {
var xxx_messageInfo_ProofTaskResult proto.InternalMessageInfo
func (m *ProofTaskResult) GetTaskId() string {
if m != nil {
return m.TaskId
}
return ""
}
func (m *ProofTaskResult) GetManagerSignature() []byte {
if m != nil {
return m.ManagerSignature
}
return nil
}
type DispatchTaskRequest struct {
TaskType string `protobuf:"bytes,1,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"`
TaskData []byte `protobuf:"bytes,2,opt,name=task_data,json=taskData,proto3" json:"task_data,omitempty"`
Worker string `protobuf:"bytes,3,opt,name=worker,proto3" json:"worker,omitempty"`
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
TaskType TaskType `protobuf:"varint,2,opt,name=task_type,json=taskType,proto3,enum=nodemanager.v1.TaskType" json:"task_type,omitempty"`
TaskData *v1.TaskContent `protobuf:"bytes,3,opt,name=task_data,json=taskData,proto3" json:"task_data,omitempty"`
Worker string `protobuf:"bytes,4,opt,name=worker,proto3" json:"worker,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -412,7 +876,7 @@ func (m *DispatchTaskRequest) Reset() { *m = DispatchTaskRequest{} }
func (m *DispatchTaskRequest) String() string { return proto.CompactTextString(m) }
func (*DispatchTaskRequest) ProtoMessage() {}
func (*DispatchTaskRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{8}
return fileDescriptor_810ae261dc8e2975, []int{15}
}
func (m *DispatchTaskRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DispatchTaskRequest.Unmarshal(m, b)
......@@ -432,14 +896,21 @@ func (m *DispatchTaskRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_DispatchTaskRequest proto.InternalMessageInfo
func (m *DispatchTaskRequest) GetTaskType() string {
func (m *DispatchTaskRequest) GetTaskId() string {
if m != nil {
return m.TaskType
return m.TaskId
}
return ""
}
func (m *DispatchTaskRequest) GetTaskData() []byte {
func (m *DispatchTaskRequest) GetTaskType() TaskType {
if m != nil {
return m.TaskType
}
return TaskType_SystemTask
}
func (m *DispatchTaskRequest) GetTaskData() *v1.TaskContent {
if m != nil {
return m.TaskData
}
......@@ -455,7 +926,7 @@ func (m *DispatchTaskRequest) GetWorker() string {
type DispatchTaskResponse struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
Worker string `protobuf:"bytes,2,opt,name=worker,proto3" json:"worker,omitempty"`
WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -465,7 +936,7 @@ func (m *DispatchTaskResponse) Reset() { *m = DispatchTaskResponse{} }
func (m *DispatchTaskResponse) String() string { return proto.CompactTextString(m) }
func (*DispatchTaskResponse) ProtoMessage() {}
func (*DispatchTaskResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{9}
return fileDescriptor_810ae261dc8e2975, []int{16}
}
func (m *DispatchTaskResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DispatchTaskResponse.Unmarshal(m, b)
......@@ -492,135 +963,102 @@ func (m *DispatchTaskResponse) GetTaskId() string {
return ""
}
func (m *DispatchTaskResponse) GetWorker() string {
func (m *DispatchTaskResponse) GetWorkerId() string {
if m != nil {
return m.Worker
return m.WorkerId
}
return ""
}
type DeviceInfo struct {
// device info for gpu
DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
DeviceType string `protobuf:"bytes,2,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
DevicePower uint64 `protobuf:"varint,3,opt,name=device_power,json=devicePower,proto3" json:"device_power,omitempty"`
type ManagerListRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeviceInfo) Reset() { *m = DeviceInfo{} }
func (m *DeviceInfo) String() string { return proto.CompactTextString(m) }
func (*DeviceInfo) ProtoMessage() {}
func (*DeviceInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{10}
}
func (m *DeviceInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceInfo.Unmarshal(m, b)
}
func (m *DeviceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeviceInfo.Marshal(b, m, deterministic)
func (m *ManagerListRequest) Reset() { *m = ManagerListRequest{} }
func (m *ManagerListRequest) String() string { return proto.CompactTextString(m) }
func (*ManagerListRequest) ProtoMessage() {}
func (*ManagerListRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{17}
}
func (m *DeviceInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceInfo.Merge(m, src)
func (m *ManagerListRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ManagerListRequest.Unmarshal(m, b)
}
func (m *DeviceInfo) XXX_Size() int {
return xxx_messageInfo_DeviceInfo.Size(m)
func (m *ManagerListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ManagerListRequest.Marshal(b, m, deterministic)
}
func (m *DeviceInfo) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceInfo.DiscardUnknown(m)
func (m *ManagerListRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ManagerListRequest.Merge(m, src)
}
var xxx_messageInfo_DeviceInfo proto.InternalMessageInfo
func (m *DeviceInfo) GetDeviceName() string {
if m != nil {
return m.DeviceName
}
return ""
func (m *ManagerListRequest) XXX_Size() int {
return xxx_messageInfo_ManagerListRequest.Size(m)
}
func (m *DeviceInfo) GetDeviceType() string {
if m != nil {
return m.DeviceType
}
return ""
func (m *ManagerListRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ManagerListRequest.DiscardUnknown(m)
}
func (m *DeviceInfo) GetDevicePower() uint64 {
if m != nil {
return m.DevicePower
}
return 0
}
var xxx_messageInfo_ManagerListRequest proto.InternalMessageInfo
type WorkerContent struct {
WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
WorkerPubkey string `protobuf:"bytes,2,opt,name=worker_pubkey,json=workerPubkey,proto3" json:"worker_pubkey,omitempty"`
Devices []*DeviceInfo `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices,omitempty"`
type ManagerListResponse struct {
Managers []*NodeManagerInfo `protobuf:"bytes,1,rep,name=managers,proto3" json:"managers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WorkerContent) Reset() { *m = WorkerContent{} }
func (m *WorkerContent) String() string { return proto.CompactTextString(m) }
func (*WorkerContent) ProtoMessage() {}
func (*WorkerContent) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{11}
}
func (m *WorkerContent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WorkerContent.Unmarshal(m, b)
func (m *ManagerListResponse) Reset() { *m = ManagerListResponse{} }
func (m *ManagerListResponse) String() string { return proto.CompactTextString(m) }
func (*ManagerListResponse) ProtoMessage() {}
func (*ManagerListResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_810ae261dc8e2975, []int{18}
}
func (m *WorkerContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WorkerContent.Marshal(b, m, deterministic)
func (m *ManagerListResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ManagerListResponse.Unmarshal(m, b)
}
func (m *WorkerContent) XXX_Merge(src proto.Message) {
xxx_messageInfo_WorkerContent.Merge(m, src)
func (m *ManagerListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ManagerListResponse.Marshal(b, m, deterministic)
}
func (m *WorkerContent) XXX_Size() int {
return xxx_messageInfo_WorkerContent.Size(m)
func (m *ManagerListResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ManagerListResponse.Merge(m, src)
}
func (m *WorkerContent) XXX_DiscardUnknown() {
xxx_messageInfo_WorkerContent.DiscardUnknown(m)
func (m *ManagerListResponse) XXX_Size() int {
return xxx_messageInfo_ManagerListResponse.Size(m)
}
var xxx_messageInfo_WorkerContent proto.InternalMessageInfo
func (m *WorkerContent) GetWorkerId() string {
if m != nil {
return m.WorkerId
}
return ""
func (m *ManagerListResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ManagerListResponse.DiscardUnknown(m)
}
func (m *WorkerContent) GetWorkerPubkey() string {
if m != nil {
return m.WorkerPubkey
}
return ""
}
var xxx_messageInfo_ManagerListResponse proto.InternalMessageInfo
func (m *WorkerContent) GetDevices() []*DeviceInfo {
func (m *ManagerListResponse) GetManagers() []*NodeManagerInfo {
if m != nil {
return m.Devices
return m.Managers
}
return nil
}
func init() {
proto.RegisterEnum("nodemanager.v1.TaskType", TaskType_name, TaskType_value)
proto.RegisterType((*WorkerMessage)(nil), "nodemanager.v1.WorkerMessage")
proto.RegisterType((*ManagerMessage)(nil), "nodemanager.v1.ManagerMessage")
proto.RegisterType((*GoodbyeMessage)(nil), "nodemanager.v1.GoodbyeMessage")
proto.RegisterType((*HeartbeatRequest)(nil), "nodemanager.v1.HeartbeatRequest")
proto.RegisterType((*HeartbeatResponse)(nil), "nodemanager.v1.HeartbeatResponse")
proto.RegisterType((*StatusResp)(nil), "nodemanager.v1.StatusResp")
proto.RegisterType((*StatusRequest)(nil), "nodemanager.v1.StatusRequest")
proto.RegisterType((*DeviceUsageRequest)(nil), "nodemanager.v1.DeviceUsageRequest")
proto.RegisterType((*DeviceUsageResponse)(nil), "nodemanager.v1.DeviceUsageResponse")
proto.RegisterType((*DeviceInfoRequest)(nil), "nodemanager.v1.DeviceInfoRequest")
proto.RegisterType((*DeviceInfoResponse)(nil), "nodemanager.v1.DeviceInfoResponse")
proto.RegisterType((*DeviceUsage)(nil), "nodemanager.v1.DeviceUsage")
proto.RegisterType((*StatusResponse)(nil), "nodemanager.v1.StatusResponse")
proto.RegisterType((*PushTaskMessage)(nil), "nodemanager.v1.PushTaskMessage")
proto.RegisterType((*SubmitTaskResult)(nil), "nodemanager.v1.SubmitTaskResult")
proto.RegisterType((*ProofTaskResult)(nil), "nodemanager.v1.ProofTaskResult")
proto.RegisterType((*DispatchTaskRequest)(nil), "nodemanager.v1.DispatchTaskRequest")
proto.RegisterType((*DispatchTaskResponse)(nil), "nodemanager.v1.DispatchTaskResponse")
proto.RegisterType((*DeviceInfo)(nil), "nodemanager.v1.DeviceInfo")
proto.RegisterType((*WorkerContent)(nil), "nodemanager.v1.WorkerContent")
proto.RegisterType((*ManagerListRequest)(nil), "nodemanager.v1.ManagerListRequest")
proto.RegisterType((*ManagerListResponse)(nil), "nodemanager.v1.ManagerListResponse")
}
func init() {
......@@ -628,47 +1066,70 @@ func init() {
}
var fileDescriptor_810ae261dc8e2975 = []byte{
// 659 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xd1, 0x6e, 0xd3, 0x30,
0x14, 0x6d, 0xd3, 0x69, 0x5b, 0x6f, 0xbb, 0x75, 0xf5, 0xa6, 0x51, 0x8d, 0x87, 0x75, 0x41, 0x48,
0xbc, 0xd0, 0xaa, 0xc0, 0xd3, 0x10, 0x2f, 0x65, 0xd2, 0xba, 0x87, 0x6e, 0x51, 0x98, 0xc6, 0x84,
0x26, 0x55, 0x6e, 0xe3, 0x35, 0x55, 0x97, 0x38, 0x8b, 0x9d, 0x4e, 0xfd, 0x02, 0x24, 0x3e, 0x83,
0x47, 0x3e, 0x85, 0x67, 0xbe, 0x80, 0x47, 0x7e, 0x02, 0xe4, 0x6b, 0xb7, 0x4d, 0x32, 0xe0, 0x2d,
0x3e, 0x3e, 0x39, 0xf7, 0x9e, 0x73, 0x6d, 0xc3, 0xf3, 0x90, 0x7b, 0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 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0xda, 0x7b, 0xc2, 0xc6, 0xa5,
0x05, 0x00, 0x00,
// 1026 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xdb, 0x46,
0x10, 0xb6, 0x7e, 0x2c, 0x4b, 0x63, 0x99, 0x92, 0xd6, 0x46, 0xaa, 0x3a, 0x75, 0xe3, 0x30, 0x28,
0xe0, 0xb6, 0xa8, 0x54, 0xb9, 0x0d, 0x10, 0x24, 0x37, 0xdb, 0xad, 0xe5, 0xc0, 0x76, 0x54, 0x3a,
0x71, 0x82, 0x22, 0x80, 0xb0, 0x12, 0xd7, 0x92, 0x60, 0x93, 0xcb, 0x72, 0x97, 0x0e, 0xf4, 0x22,
0x7d, 0x80, 0x1e, 0x7b, 0x2a, 0x7a, 0xea, 0x33, 0xf4, 0x5c, 0xf4, 0x01, 0x7a, 0xec, 0x53, 0x14,
0x3b, 0xbb, 0x94, 0x49, 0xca, 0x72, 0x0e, 0xcd, 0x8d, 0xfb, 0xed, 0xb7, 0xdf, 0x0c, 0xf7, 0x9b,
0x19, 0x12, 0x3e, 0xf3, 0xb9, 0xcb, 0x3c, 0xea, 0xd3, 0x11, 0x0b, 0xdb, 0xd7, 0x9d, 0x76, 0xc8,
0x7e, 0x8a, 0x98, 0x90, 0xfd, 0x90, 0x89, 0x80, 0xfb, 0x82, 0xb5, 0x82, 0x90, 0x4b, 0x4e, 0xac,
0x04, 0xad, 0x75, 0xdd, 0xd9, 0xbc, 0x37, 0xa0, 0x82, 0x29, 0x3e, 0x77, 0xa7, 0x42, 0xb0, 0x48,
0x68, 0xde, 0xe6, 0xd6, 0x9c, 0x9c, 0xe0, 0x51, 0x38, 0x34, 0x32, 0xf6, 0xdf, 0x05, 0x58, 0x7b,
0xcd, 0xc3, 0x4b, 0x16, 0x9e, 0x30, 0x21, 0xe8,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x9b, 0xdf, 0xfb, 0x2b, 0x07, 0x64,
0xc8, 0xbd, 0x4c, 0xa8, 0xbd, 0x0d, 0x93, 0x6d, 0x9c, 0x5e, 0x4f, 0xfd, 0x77, 0xf5, 0x72, 0x3f,
0xbe, 0x18, 0x4d, 0xe4, 0x38, 0x1a, 0xb4, 0x86, 0xdc, 0x9b, 0xfd, 0xb3, 0xcd, 0x1e, 0xbe, 0xc2,
0xbf, 0xb3, 0x21, 0xbf, 0x6a, 0x8f, 0x98, 0xdf, 0xc6, 0x45, 0x7b, 0xc4, 0xdb, 0xe9, 0x7f, 0xb9,
0x67, 0x89, 0xe5, 0x75, 0xe7, 0x97, 0x7c, 0xe1, 0xf4, 0xcd, 0x9b, 0x5f, 0xf3, 0xd6, 0x69, 0x22,
0xfe, 0x79, 0xe7, 0xcf, 0x14, 0xf0, 0xf6, 0xbc, 0xf3, 0x4f, 0x7e, 0x33, 0x0d, 0xbc, 0x3d, 0xec,
0xed, 0x9d, 0x30, 0x49, 0x95, 0xe9, 0xff, 0xe6, 0x6b, 0x89, 0xcd, 0xa7, 0x4f, 0xcf, 0x3b, 0x83,
0x12, 0x46, 0xff, 0xe6, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x25, 0x1b, 0x19, 0xda, 0x98, 0x0a,
0x00, 0x00,
}
......@@ -20,20 +20,200 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type NodeManagerInfo struct {
Publickey string `protobuf:"bytes,1,opt,name=publickey,proto3" json:"publickey,omitempty"`
Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NodeManagerInfo) Reset() { *m = NodeManagerInfo{} }
func (m *NodeManagerInfo) String() string { return proto.CompactTextString(m) }
func (*NodeManagerInfo) ProtoMessage() {}
func (*NodeManagerInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_462e4441103de524, []int{0}
}
func (m *NodeManagerInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeManagerInfo.Unmarshal(m, b)
}
func (m *NodeManagerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NodeManagerInfo.Marshal(b, m, deterministic)
}
func (m *NodeManagerInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeManagerInfo.Merge(m, src)
}
func (m *NodeManagerInfo) XXX_Size() int {
return xxx_messageInfo_NodeManagerInfo.Size(m)
}
func (m *NodeManagerInfo) XXX_DiscardUnknown() {
xxx_messageInfo_NodeManagerInfo.DiscardUnknown(m)
}
var xxx_messageInfo_NodeManagerInfo proto.InternalMessageInfo
func (m *NodeManagerInfo) GetPublickey() string {
if m != nil {
return m.Publickey
}
return ""
}
func (m *NodeManagerInfo) GetEndpoint() string {
if m != nil {
return m.Endpoint
}
return ""
}
type DeviceInfo struct {
DeviceType string `protobuf:"bytes,1,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
DeviceModel string `protobuf:"bytes,2,opt,name=device_model,json=deviceModel,proto3" json:"device_model,omitempty"`
DeviceParam string `protobuf:"bytes,3,opt,name=device_param,json=deviceParam,proto3" json:"device_param,omitempty"`
DevicePower uint64 `protobuf:"varint,4,opt,name=device_power,json=devicePower,proto3" json:"device_power,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeviceInfo) Reset() { *m = DeviceInfo{} }
func (m *DeviceInfo) String() string { return proto.CompactTextString(m) }
func (*DeviceInfo) ProtoMessage() {}
func (*DeviceInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_462e4441103de524, []int{1}
}
func (m *DeviceInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceInfo.Unmarshal(m, b)
}
func (m *DeviceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeviceInfo.Marshal(b, m, deterministic)
}
func (m *DeviceInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceInfo.Merge(m, src)
}
func (m *DeviceInfo) XXX_Size() int {
return xxx_messageInfo_DeviceInfo.Size(m)
}
func (m *DeviceInfo) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceInfo.DiscardUnknown(m)
}
var xxx_messageInfo_DeviceInfo proto.InternalMessageInfo
func (m *DeviceInfo) GetDeviceType() string {
if m != nil {
return m.DeviceType
}
return ""
}
func (m *DeviceInfo) GetDeviceModel() string {
if m != nil {
return m.DeviceModel
}
return ""
}
func (m *DeviceInfo) GetDeviceParam() string {
if m != nil {
return m.DeviceParam
}
return ""
}
func (m *DeviceInfo) GetDevicePower() uint64 {
if m != nil {
return m.DevicePower
}
return 0
}
type WorkerContent struct {
WorkerPubkey string `protobuf:"bytes,1,opt,name=worker_pubkey,json=workerPubkey,proto3" json:"worker_pubkey,omitempty"`
Devices []*DeviceInfo `protobuf:"bytes,2,rep,name=devices,proto3" json:"devices,omitempty"`
DeviceProof []byte `protobuf:"bytes,3,opt,name=device_proof,json=deviceProof,proto3" json:"device_proof,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WorkerContent) Reset() { *m = WorkerContent{} }
func (m *WorkerContent) String() string { return proto.CompactTextString(m) }
func (*WorkerContent) ProtoMessage() {}
func (*WorkerContent) Descriptor() ([]byte, []int) {
return fileDescriptor_462e4441103de524, []int{2}
}
func (m *WorkerContent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WorkerContent.Unmarshal(m, b)
}
func (m *WorkerContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WorkerContent.Marshal(b, m, deterministic)
}
func (m *WorkerContent) XXX_Merge(src proto.Message) {
xxx_messageInfo_WorkerContent.Merge(m, src)
}
func (m *WorkerContent) XXX_Size() int {
return xxx_messageInfo_WorkerContent.Size(m)
}
func (m *WorkerContent) XXX_DiscardUnknown() {
xxx_messageInfo_WorkerContent.DiscardUnknown(m)
}
var xxx_messageInfo_WorkerContent proto.InternalMessageInfo
func (m *WorkerContent) GetWorkerPubkey() string {
if m != nil {
return m.WorkerPubkey
}
return ""
}
func (m *WorkerContent) GetDevices() []*DeviceInfo {
if m != nil {
return m.Devices
}
return nil
}
func (m *WorkerContent) GetDeviceProof() []byte {
if m != nil {
return m.DeviceProof
}
return nil
}
func init() {
proto.RegisterType((*NodeManagerInfo)(nil), "nodemanager.v1.NodeManagerInfo")
proto.RegisterType((*DeviceInfo)(nil), "nodemanager.v1.DeviceInfo")
proto.RegisterType((*WorkerContent)(nil), "nodemanager.v1.WorkerContent")
}
func init() { proto.RegisterFile("nodemanager/v1/resource.proto", fileDescriptor_462e4441103de524) }
var fileDescriptor_462e4441103de524 = []byte{
// 181 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0xcb, 0x4f, 0x49,
0xcd, 0x4d, 0xcc, 0x4b, 0x4c, 0x4f, 0x2d, 0xd2, 0x2f, 0x33, 0xd4, 0x2f, 0x4a, 0x2d, 0xce, 0x2f,
0x2d, 0x4a, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x43, 0x92, 0xd6, 0x2b, 0x33,
0x74, 0x3a, 0xcb, 0xc8, 0x25, 0x94, 0x9c, 0x9f, 0xab, 0x87, 0x26, 0xcc, 0x1b, 0x04, 0xd5, 0x16,
0x00, 0xd2, 0x15, 0xc0, 0x18, 0xe5, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f,
0xab, 0x9f, 0x9f, 0x52, 0x59, 0x5c, 0x9c, 0x5a, 0x5a, 0x0c, 0x67, 0xe8, 0x82, 0xcd, 0x4e, 0xce,
0xcf, 0xd1, 0x4f, 0x4f, 0xcd, 0xd3, 0x07, 0x73, 0xf4, 0xd3, 0xf3, 0xf5, 0x51, 0x5d, 0x62, 0x8d,
0xc4, 0x2d, 0x33, 0x5c, 0xc4, 0xc4, 0xec, 0x17, 0x11, 0xb1, 0x8a, 0x89, 0xcf, 0x0f, 0xc9, 0xe2,
0x30, 0xc3, 0x53, 0x28, 0x02, 0x31, 0x61, 0x86, 0x8f, 0x98, 0xa4, 0x50, 0x05, 0x62, 0xdc, 0x03,
0x9c, 0x7c, 0x53, 0x4b, 0x12, 0x53, 0x12, 0x4b, 0x12, 0x5f, 0x31, 0xf1, 0x23, 0x49, 0x5a, 0x59,
0x85, 0x19, 0x26, 0xb1, 0x81, 0x6d, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x5d, 0x07,
0x12, 0x07, 0x01, 0x00, 0x00,
// 383 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xcd, 0x6a, 0xdb, 0x40,
0x14, 0x85, 0x91, 0x6c, 0xda, 0x7a, 0xfc, 0x07, 0x5a, 0x09, 0xd3, 0x52, 0xd7, 0xdd, 0x78, 0x53,
0x09, 0xb5, 0x5d, 0xb9, 0x3b, 0xb7, 0x50, 0x4a, 0xb1, 0x2b, 0x4c, 0x71, 0x4c, 0x30, 0x18, 0xfd,
0x5c, 0x2b, 0xc2, 0xd6, 0x5c, 0x31, 0x1a, 0xc9, 0xe8, 0x21, 0xb2, 0xcd, 0x03, 0x64, 0x99, 0x47,
0x09, 0xe4, 0x25, 0xb2, 0xcc, 0x53, 0x04, 0x8d, 0x14, 0x79, 0x94, 0x9d, 0xce, 0x77, 0x8f, 0xce,
0xdc, 0x99, 0x43, 0x3e, 0x50, 0xf4, 0x21, 0x72, 0xa8, 0x13, 0x00, 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, 0x1e, 0x46, 0xaf, 0xd2, 0xe6, 0xfd, 0x55, 0x55, 0x96, 0x5d, 0x74,
0x65, 0x2b, 0x97, 0xff, 0x82, 0x90, 0x5f, 0xa5, 0xae, 0xe1, 0x61, 0x64, 0xa2, 0x9f, 0x27, 0x09,
0xa4, 0x49, 0xfd, 0xf1, 0x45, 0x34, 0xea, 0xe1, 0xd1, 0x0c, 0x80, 0x9a, 0x42, 0x98, 0x01, 0x9a,
0xcd, 0xfe, 0x7f, 0x48, 0x32, 0xb3, 0x6e, 0xd5, 0xd6, 0x72, 0xb3, 0xb9, 0x53, 0x07, 0x4b, 0xe9,
0xe0, 0xb5, 0x75, 0xdf, 0x00, 0xdb, 0xb5, 0xf5, 0xa8, 0x8e, 0x9a, 0x60, 0xfb, 0xdb, 0x9e, 0x2f,
0x80, 0x3b, 0xbe, 0xc3, 0x9d, 0x27, 0x75, 0x28, 0x0d, 0x67, 0xb3, 0xb5, 0xe5, 0xbe, 0x11, 0xa7,
0x7f, 0x7b, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x9b, 0xeb, 0x03, 0x7d, 0x02, 0x00, 0x00,
}
......@@ -23,24 +23,25 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() { proto.RegisterFile("nodemanager/v1/service.proto", fileDescriptor_085790cc5673c432) }
var fileDescriptor_085790cc5673c432 = []byte{
// 296 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4a, 0xc4, 0x40,
0x10, 0x86, 0x2f, 0x11, 0x2c, 0xc2, 0x11, 0x61, 0xcb, 0xa0, 0x16, 0xa7, 0x82, 0x8d, 0x59, 0x57,
0xbb, 0xb3, 0x0b, 0x82, 0x55, 0x62, 0x38, 0x35, 0x1e, 0x7a, 0x20, 0x7b, 0xc9, 0xb0, 0x17, 0xce,
0x64, 0xe3, 0xce, 0x26, 0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, 0xe8, 0x94, 0x15,
0x7b, 0x33, 0xb7, 0x82, 0xf9, 0xfc, 0xdd, 0xb4, 0x83, 0x8e, 0x6f, 0xc4, 0x3e, 0x7b, 0x8d, 0x45,
0xc4, 0xbe, 0x4d, 0xa7, 0xdf, 0x58, 0x5c, 0x85, 0x9e, 0x0f, 0x9a, 0x27, 0x5c, 0xf3, 0x1f, 0x73,
0xa7, 0x03, 0xa7, 0xd3, 0x88, 0x2d, 0xb7, 0x6b, 0xf7, 0xf3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff,
0xb9, 0x2f, 0xc2, 0xe0, 0xf7, 0x01, 0x00, 0x00,
// 318 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xc1, 0x4a, 0xfb, 0x40,
0x10, 0xc6, 0x9b, 0xfc, 0xe1, 0x7f, 0x58, 0x4b, 0x85, 0x3d, 0x06, 0xf5, 0x50, 0x15, 0xbc, 0x98,
0x75, 0xf5, 0x56, 0x6f, 0x45, 0xf0, 0x62, 0x6b, 0xa9, 0x5a, 0x83, 0x16, 0x64, 0x9b, 0x0c, 0xdb,
0x50, 0x93, 0x8d, 0x3b, 0x9b, 0x80, 0xaf, 0xd3, 0xa3, 0x8f, 0x22, 0x3e, 0x85, 0x47, 0x9f, 0x42,
0x9a, 0xa4, 0x92, 0x44, 0xec, 0x6d, 0xe7, 0xfb, 0x7d, 0xf3, 0xcd, 0xee, 0x2c, 0xd9, 0x89, 0x55,
0x00, 0x91, 0x88, 0x85, 0x04, 0xcd, 0x32, 0xce, 0x10, 0x74, 0x16, 0xfa, 0xe0, 0x26, 0x5a, 0x19,
0x45, 0x3b, 0x15, 0xea, 0x66, 0xdc, 0x39, 0x6c, 0xb8, 0x35, 0xbc, 0xa4, 0x80, 0xe6, 0x49, 0x03,
0x26, 0x2a, 0xc6, 0xb2, 0xed, 0x74, 0x69, 0x13, 0x3a, 0x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 0x00, 0xff, 0xff, 0xcb, 0xc9, 0xad, 0xb7, 0x51, 0x02, 0x00, 0x00,
}
......@@ -23,6 +23,7 @@ const _ = grpc.SupportPackageIsVersion7
// 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.
type NodeManagerServiceClient interface {
RegisterWorker(ctx context.Context, opts ...grpc.CallOption) (NodeManagerService_RegisterWorkerClient, error)
ManagerList(ctx context.Context, in *ManagerListRequest, opts ...grpc.CallOption) (*ManagerListResponse, error)
DispatchTask(ctx context.Context, in *DispatchTaskRequest, opts ...grpc.CallOption) (*DispatchTaskResponse, error)
}
......@@ -65,6 +66,15 @@ func (x *nodeManagerServiceRegisterWorkerClient) Recv() (*ManagerMessage, error)
return m, nil
}
func (c *nodeManagerServiceClient) ManagerList(ctx context.Context, in *ManagerListRequest, opts ...grpc.CallOption) (*ManagerListResponse, error) {
out := new(ManagerListResponse)
err := c.cc.Invoke(ctx, "/nodemanager.v1.NodeManagerService/ManagerList", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeManagerServiceClient) DispatchTask(ctx context.Context, in *DispatchTaskRequest, opts ...grpc.CallOption) (*DispatchTaskResponse, error) {
out := new(DispatchTaskResponse)
err := c.cc.Invoke(ctx, "/nodemanager.v1.NodeManagerService/DispatchTask", in, out, opts...)
......@@ -79,6 +89,7 @@ func (c *nodeManagerServiceClient) DispatchTask(ctx context.Context, in *Dispatc
// for forward compatibility
type NodeManagerServiceServer interface {
RegisterWorker(NodeManagerService_RegisterWorkerServer) error
ManagerList(context.Context, *ManagerListRequest) (*ManagerListResponse, error)
DispatchTask(context.Context, *DispatchTaskRequest) (*DispatchTaskResponse, error)
mustEmbedUnimplementedNodeManagerServiceServer()
}
......@@ -90,6 +101,9 @@ type UnimplementedNodeManagerServiceServer struct {
func (UnimplementedNodeManagerServiceServer) RegisterWorker(NodeManagerService_RegisterWorkerServer) error {
return status.Errorf(codes.Unimplemented, "method RegisterWorker not implemented")
}
func (UnimplementedNodeManagerServiceServer) ManagerList(context.Context, *ManagerListRequest) (*ManagerListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ManagerList not implemented")
}
func (UnimplementedNodeManagerServiceServer) DispatchTask(context.Context, *DispatchTaskRequest) (*DispatchTaskResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DispatchTask not implemented")
}
......@@ -132,6 +146,24 @@ func (x *nodeManagerServiceRegisterWorkerServer) Recv() (*WorkerMessage, error)
return m, nil
}
func _NodeManagerService_ManagerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ManagerListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeManagerServiceServer).ManagerList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/nodemanager.v1.NodeManagerService/ManagerList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeManagerServiceServer).ManagerList(ctx, req.(*ManagerListRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeManagerService_DispatchTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DispatchTaskRequest)
if err := dec(in); err != nil {
......@@ -157,6 +189,10 @@ var NodeManagerService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "nodemanager.v1.NodeManagerService",
HandlerType: (*NodeManagerServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ManagerList",
Handler: _NodeManagerService_ManagerList_Handler,
},
{
MethodName: "DispatchTask",
Handler: _NodeManagerService_DispatchTask_Handler,
......
......@@ -3,13 +3,16 @@ syntax = "proto3";
package nodemanager.v1;
import "base/v1/odysseus.proto";
import "nodemanager/v1/resource.proto";
message WorkerMessage {
oneof message {
HeartbeatResponse heartbeat_response = 1;
SubmitTaskResult submit_task_result = 2;
StatusResp status_resp = 3;
StatusResponse status = 3;
DeviceInfoResponse device_info = 4;
DeviceUsageResponse device_usage = 5;
GoodbyeMessage goodbye_message = 6;
}
}
......@@ -18,58 +21,99 @@ message ManagerMessage {
HeartbeatRequest heartbeat_request = 1;
PushTaskMessage push_task_message = 2;
ProofTaskResult proof_task_result = 3;
StatusRequest status_request = 4;
DeviceInfoRequest device_request = 5;
DeviceUsageRequest device_usage = 6;
GoodbyeMessage goodbye_message = 7;
}
}
enum TaskType {
SystemTask = 0;
UserTask = 1;
CustomTask = 2;
}
message GoodbyeMessage {
string reason = 1;
}
message HeartbeatRequest {
uint64 timestamp = 1;
}
message HeartbeatResponse {
uint64 timestamp = 1;
}
message StatusRequest {
}
message DeviceUsageRequest {
}
message DeviceUsageResponse {
repeated DeviceUsage usage = 1;
}
message DeviceInfoRequest {
message StatusResp {
uint64 remain_power = 1;
uint64 remain_device = 2; // 剩余
}
message DeviceInfoResponse {
repeated DeviceInfo devices = 1;
}
message DeviceUsage {
string device_type = 1; // cpu/gpu/mem with index, ex: cpu-0, ... cpu-5
uint64 device_usage = 2;
}
message StatusResponse {
bytes device_status = 1; // bitmap
}
message PushTaskMessage {
string task_id = 1;
base.v1.TaskContent task = 1;
TaskType task_type = 2;
uint64 work_load = 3;
string task_cmd = 4; //
bytes task_param = 5;
}
// 容器签名 (task_id+hash(task_param)+hash(task_result))
// 矿工签名 (task_id+hash(task_param)+hash(task_result))
// nodemanager签名 (task_id+hash(task_param)+hash(task_result)+docker_signature+miner_signature+workload)
message SubmitTaskResult {
string task_id = 1;
string task_proof = 2;
bytes worker_signature = 3;
bytes task_result = 4;
bytes task_proof = 2; // 容器签名
bytes worker_signature = 3; // worker 签名
bytes task_result = 4; // 任务结果
}
message ProofTaskResult {
string task_id = 1;
bytes manager_signature = 2;
bytes manager_signature = 2; // nodemanager 签名
}
message DispatchTaskRequest {
string task_type = 1;
base.v1.TaskContent task_data = 2;
string worker = 3;
string task_id = 1;
TaskType task_type = 2;
base.v1.TaskContent task_data = 3;
string worker = 4;
}
message DispatchTaskResponse {
string task_id = 1;
string worker = 2;
string worker_id = 2;
}
message DeviceInfo {
// device info for gpu
string device_name = 1;
string device_type = 2;
uint64 device_power = 3;
message ManagerListRequest {
}
message WorkerContent {
string worker_id = 1;
string worker_pubkey = 2;
repeated DeviceInfo devices = 3;
message ManagerListResponse {
repeated NodeManagerInfo managers = 1;
}
\ No newline at end of file
......@@ -2,3 +2,21 @@ syntax = "proto3";
package nodemanager.v1;
message NodeManagerInfo {
string publickey = 1;
string endpoint = 2;
}
message DeviceInfo {
string device_type = 1; // cpu/gpu/mem
string device_model = 2; // 具体型号 rtx-4090
string device_param = 3; // 内存容量/CPU主频/GPU显存 等等
uint64 device_power = 4; // CPU: hashrate, MEM: size, GPU: 算力, GPUMEM:size
}
message WorkerContent {
string worker_pubkey = 1;
repeated DeviceInfo devices = 2;
bytes device_proof = 3; // 由测试程序对设备信息进行签名
}
\ No newline at end of file
......@@ -6,5 +6,7 @@ import "nodemanager/v1/request_response.proto";
service NodeManagerService {
rpc RegisterWorker(stream WorkerMessage) returns (stream ManagerMessage) {}
rpc ManagerList(ManagerListRequest) returns (ManagerListResponse) {}
rpc DispatchTask(DispatchTaskRequest) returns (DispatchTaskResponse) {}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment