From d46b1e7c9b551cdd5070a2725a56a7fb5992a922 Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 18 Nov 2022 15:01:01 +0800 Subject: [PATCH] feat: optimize service (#34) Signed-off-by: Gaius --- pkg/apis/scheduler/v1/scheduler.pb.go | 744 +++++++++--------- .../scheduler/v1/scheduler.pb.validate.go | 610 +++++++------- pkg/apis/scheduler/v1/scheduler.proto | 52 +- 3 files changed, 703 insertions(+), 703 deletions(-) diff --git a/pkg/apis/scheduler/v1/scheduler.pb.go b/pkg/apis/scheduler/v1/scheduler.pb.go index a7f00b3..65fcd6b 100644 --- a/pkg/apis/scheduler/v1/scheduler.pb.go +++ b/pkg/apis/scheduler/v1/scheduler.pb.go @@ -907,20 +907,28 @@ type PeerResult_SourceError struct { func (*PeerResult_SourceError) isPeerResult_Errordetails() {} -// PeerTarget represents request of LeaveTask. -type PeerTarget struct { +// AnnounceTaskRequest represents request of AnnounceTask. +type AnnounceTaskRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task id. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // Peer id. - PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + // Download url. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + // URL meta info. + UrlMeta *v1.UrlMeta `protobuf:"bytes,3,opt,name=url_meta,json=urlMeta,proto3" json:"url_meta,omitempty"` + // Peer host info. + PeerHost *PeerHost `protobuf:"bytes,4,opt,name=peer_host,json=peerHost,proto3" json:"peer_host,omitempty"` + // Task piece info. + PiecePacket *v1.PiecePacket `protobuf:"bytes,5,opt,name=piece_packet,json=piecePacket,proto3" json:"piece_packet,omitempty"` + // Task type. + TaskType v1.TaskType `protobuf:"varint,6,opt,name=task_type,json=taskType,proto3,enum=common.TaskType" json:"task_type,omitempty"` } -func (x *PeerTarget) Reset() { - *x = PeerTarget{} +func (x *AnnounceTaskRequest) Reset() { + *x = AnnounceTaskRequest{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -928,13 +936,13 @@ func (x *PeerTarget) Reset() { } } -func (x *PeerTarget) String() string { +func (x *AnnounceTaskRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PeerTarget) ProtoMessage() {} +func (*AnnounceTaskRequest) ProtoMessage() {} -func (x *PeerTarget) ProtoReflect() protoreflect.Message { +func (x *AnnounceTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -946,25 +954,53 @@ func (x *PeerTarget) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PeerTarget.ProtoReflect.Descriptor instead. -func (*PeerTarget) Descriptor() ([]byte, []int) { +// Deprecated: Use AnnounceTaskRequest.ProtoReflect.Descriptor instead. +func (*AnnounceTaskRequest) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{7} } -func (x *PeerTarget) GetTaskId() string { +func (x *AnnounceTaskRequest) GetTaskId() string { if x != nil { return x.TaskId } return "" } -func (x *PeerTarget) GetPeerId() string { +func (x *AnnounceTaskRequest) GetUrl() string { if x != nil { - return x.PeerId + return x.Url } return "" } +func (x *AnnounceTaskRequest) GetUrlMeta() *v1.UrlMeta { + if x != nil { + return x.UrlMeta + } + return nil +} + +func (x *AnnounceTaskRequest) GetPeerHost() *PeerHost { + if x != nil { + return x.PeerHost + } + return nil +} + +func (x *AnnounceTaskRequest) GetPiecePacket() *v1.PiecePacket { + if x != nil { + return x.PiecePacket + } + return nil +} + +func (x *AnnounceTaskRequest) GetTaskType() v1.TaskType { + if x != nil { + return x.TaskType + } + return v1.TaskType(0) +} + // StatTaskRequest represents request of StatTask. type StatTaskRequest struct { state protoimpl.MessageState @@ -1117,28 +1153,20 @@ func (x *Task) GetHasAvailablePeer() bool { return false } -// AnnounceTaskRequest represents request of AnnounceTask. -type AnnounceTaskRequest struct { +// PeerTarget represents request of LeaveTask. +type PeerTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task id. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // Download url. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // URL meta info. - UrlMeta *v1.UrlMeta `protobuf:"bytes,3,opt,name=url_meta,json=urlMeta,proto3" json:"url_meta,omitempty"` - // Peer host info. - PeerHost *PeerHost `protobuf:"bytes,4,opt,name=peer_host,json=peerHost,proto3" json:"peer_host,omitempty"` - // Task piece info. - PiecePacket *v1.PiecePacket `protobuf:"bytes,5,opt,name=piece_packet,json=piecePacket,proto3" json:"piece_packet,omitempty"` - // Task type. - TaskType v1.TaskType `protobuf:"varint,6,opt,name=task_type,json=taskType,proto3,enum=common.TaskType" json:"task_type,omitempty"` + // Peer id. + PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` } -func (x *AnnounceTaskRequest) Reset() { - *x = AnnounceTaskRequest{} +func (x *PeerTarget) Reset() { + *x = PeerTarget{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1146,13 +1174,13 @@ func (x *AnnounceTaskRequest) Reset() { } } -func (x *AnnounceTaskRequest) String() string { +func (x *PeerTarget) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AnnounceTaskRequest) ProtoMessage() {} +func (*PeerTarget) ProtoMessage() {} -func (x *AnnounceTaskRequest) ProtoReflect() protoreflect.Message { +func (x *PeerTarget) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1164,51 +1192,72 @@ func (x *AnnounceTaskRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AnnounceTaskRequest.ProtoReflect.Descriptor instead. -func (*AnnounceTaskRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PeerTarget.ProtoReflect.Descriptor instead. +func (*PeerTarget) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{10} } -func (x *AnnounceTaskRequest) GetTaskId() string { +func (x *PeerTarget) GetTaskId() string { if x != nil { return x.TaskId } return "" } -func (x *AnnounceTaskRequest) GetUrl() string { +func (x *PeerTarget) GetPeerId() string { if x != nil { - return x.Url + return x.PeerId } return "" } -func (x *AnnounceTaskRequest) GetUrlMeta() *v1.UrlMeta { - if x != nil { - return x.UrlMeta - } - return nil +// LeaveHostRequest represents request of LeaveHost. +type LeaveHostRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Host id. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *AnnounceTaskRequest) GetPeerHost() *PeerHost { - if x != nil { - return x.PeerHost +func (x *LeaveHostRequest) Reset() { + *x = LeaveHostRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *AnnounceTaskRequest) GetPiecePacket() *v1.PiecePacket { - if x != nil { - return x.PiecePacket - } - return nil +func (x *LeaveHostRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *AnnounceTaskRequest) GetTaskType() v1.TaskType { - if x != nil { - return x.TaskType +func (*LeaveHostRequest) ProtoMessage() {} + +func (x *LeaveHostRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return v1.TaskType(0) + return mi.MessageOf(x) +} + +// Deprecated: Use LeaveHostRequest.ProtoReflect.Descriptor instead. +func (*LeaveHostRequest) Descriptor() ([]byte, []int) { + return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{11} +} + +func (x *LeaveHostRequest) GetId() string { + if x != nil { + return x.Id + } + return "" } // AnnounceHostRequest represents request of AnnounceHost. @@ -1252,7 +1301,7 @@ type AnnounceHostRequest struct { func (x *AnnounceHostRequest) Reset() { *x = AnnounceHostRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[11] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1265,7 +1314,7 @@ func (x *AnnounceHostRequest) String() string { func (*AnnounceHostRequest) ProtoMessage() {} func (x *AnnounceHostRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[11] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1278,7 +1327,7 @@ func (x *AnnounceHostRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AnnounceHostRequest.ProtoReflect.Descriptor instead. func (*AnnounceHostRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{11} + return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{12} } func (x *AnnounceHostRequest) GetId() string { @@ -1407,7 +1456,7 @@ type CPU struct { func (x *CPU) Reset() { *x = CPU{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[12] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1420,7 +1469,7 @@ func (x *CPU) String() string { func (*CPU) ProtoMessage() {} func (x *CPU) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[12] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1433,7 +1482,7 @@ func (x *CPU) ProtoReflect() protoreflect.Message { // Deprecated: Use CPU.ProtoReflect.Descriptor instead. func (*CPU) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{12} + return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{13} } func (x *CPU) GetLogicalCount() uint32 { @@ -1503,7 +1552,7 @@ type CPUTimes struct { func (x *CPUTimes) Reset() { *x = CPUTimes{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[13] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1516,7 +1565,7 @@ func (x *CPUTimes) String() string { func (*CPUTimes) ProtoMessage() {} func (x *CPUTimes) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[13] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1529,7 +1578,7 @@ func (x *CPUTimes) ProtoReflect() protoreflect.Message { // Deprecated: Use CPUTimes.ProtoReflect.Descriptor instead. func (*CPUTimes) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{13} + return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{14} } func (x *CPUTimes) GetUser() float64 { @@ -1625,7 +1674,7 @@ type Memory struct { func (x *Memory) Reset() { *x = Memory{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[14] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1638,7 +1687,7 @@ func (x *Memory) String() string { func (*Memory) ProtoMessage() {} func (x *Memory) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[14] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1651,7 +1700,7 @@ func (x *Memory) ProtoReflect() protoreflect.Message { // Deprecated: Use Memory.ProtoReflect.Descriptor instead. func (*Memory) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{14} + return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{15} } func (x *Memory) GetTotal() uint64 { @@ -1719,7 +1768,7 @@ type Network struct { func (x *Network) Reset() { *x = Network{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[15] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1732,7 +1781,7 @@ func (x *Network) String() string { func (*Network) ProtoMessage() {} func (x *Network) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[15] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1745,7 +1794,7 @@ func (x *Network) ProtoReflect() protoreflect.Message { // Deprecated: Use Network.ProtoReflect.Descriptor instead. func (*Network) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{15} + return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{16} } func (x *Network) GetTcpConnectionCount() uint32 { @@ -1817,7 +1866,7 @@ type Disk struct { func (x *Disk) Reset() { *x = Disk{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[16] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1830,7 +1879,7 @@ func (x *Disk) String() string { func (*Disk) ProtoMessage() {} func (x *Disk) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[16] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1843,7 +1892,7 @@ func (x *Disk) ProtoReflect() protoreflect.Message { // Deprecated: Use Disk.ProtoReflect.Descriptor instead. func (*Disk) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{16} + return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{17} } func (x *Disk) GetTotal() uint64 { @@ -1921,7 +1970,7 @@ type Build struct { func (x *Build) Reset() { *x = Build{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[17] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1934,7 +1983,7 @@ func (x *Build) String() string { func (*Build) ProtoMessage() {} func (x *Build) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[17] + mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1947,7 +1996,7 @@ func (x *Build) ProtoReflect() protoreflect.Message { // Deprecated: Use Build.ProtoReflect.Descriptor instead. func (*Build) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{17} + return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{18} } func (x *Build) GetGitVersion() string { @@ -1978,55 +2027,6 @@ func (x *Build) GetPlatform() string { return "" } -// LeaveHostRequest represents request of LeaveHost. -type LeaveHostRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Host id. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *LeaveHostRequest) Reset() { - *x = LeaveHostRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LeaveHostRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LeaveHostRequest) ProtoMessage() {} - -func (x *LeaveHostRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LeaveHostRequest.ProtoReflect.Descriptor instead. -func (*LeaveHostRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{18} -} - -func (x *LeaveHostRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - type PeerPacket_DestPeer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2266,12 +2266,26 @@ var file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc = []byte{ 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x22, 0x50, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, - 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, - 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, + 0x61, 0x69, 0x6c, 0x73, 0x22, 0xaf, 0x02, 0x0a, 0x13, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, + 0x72, 0x06, 0x88, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x34, 0x0a, + 0x08, 0x75, 0x72, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x4d, + 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x08, 0x70, 0x65, 0x65, + 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x69, 0x65, 0x63, + 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, + 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x33, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9d, 0x02, 0x0a, 0x04, @@ -2292,171 +2306,157 @@ var file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc = []byte{ 0x1a, 0x02, 0x28, 0x00, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x68, 0x61, 0x73, 0x41, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x65, 0x72, 0x22, 0xaf, 0x02, 0x0a, 0x13, - 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, - 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x88, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, - 0x03, 0x75, 0x72, 0x6c, 0x12, 0x34, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x55, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x09, 0x70, 0x65, - 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x48, 0x6f, - 0x73, 0x74, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0c, - 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, - 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2d, - 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x8f, 0x05, - 0x0a, 0x13, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, - 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, - 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, - 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, - 0x28, 0x80, 0x08, 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, - 0x74, 0x12, 0x17, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x23, 0x0a, 0x08, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, - 0x30, 0x0a, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61, 0x6d, 0x69, - 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x61, 0x6d, 0x69, 0x6c, - 0x79, 0x12, 0x32, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, - 0x50, 0x55, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x03, 0x63, 0x70, - 0x75, 0x12, 0x33, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, - 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x2d, - 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12, 0x30, 0x0a, - 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x22, - 0xfb, 0x01, 0x0a, 0x03, 0x43, 0x50, 0x55, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x63, - 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, - 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, - 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, - 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x22, 0x8d, 0x03, - 0x0a, 0x08, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x26, - 0x0a, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, - 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x06, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x6e, 0x69, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x65, 0x12, 0x26, - 0x0a, 0x06, 0x69, 0x6f, 0x77, 0x61, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, - 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x06, - 0x69, 0x6f, 0x77, 0x61, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x69, 0x72, 0x71, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x52, 0x03, 0x69, 0x72, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x6f, 0x66, 0x74, - 0x69, 0x72, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, - 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x73, 0x6f, 0x66, 0x74, 0x69, - 0x72, 0x71, 0x12, 0x24, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x65, 0x72, 0x22, 0x50, 0x0a, 0x0a, 0x50, + 0x65, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x70, + 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2b, 0x0a, + 0x10, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8f, 0x05, 0x0a, 0x13, 0x41, + 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x08, 0x68, + 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, + 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x0d, 0x64, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, + 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x17, + 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x23, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x30, 0x0a, 0x0f, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0e, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x32, + 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x50, 0x55, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x33, + 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, + 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x6d, + 0x6f, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, + 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x2d, 0x0a, 0x04, 0x64, + 0x69, 0x73, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x22, 0xfb, 0x01, 0x0a, + 0x03, 0x43, 0x50, 0x55, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6c, 0x6f, 0x67, + 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x68, 0x79, + 0x73, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0d, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x31, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, + 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, + 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, + 0x2e, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x22, 0x8d, 0x03, 0x0a, 0x08, 0x43, + 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, + 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x06, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x75, 0x65, 0x73, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x67, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, - 0x0a, 0x0a, 0x67, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x52, 0x09, 0x67, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x69, 0x63, 0x65, 0x22, 0xeb, 0x01, - 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1c, - 0x0a, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, - 0x12, 0x3a, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x14, - 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, - 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, 0x73, 0x65, 0x64, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x07, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x63, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x74, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x75, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, - 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, - 0x03, 0x69, 0x64, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, - 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x22, 0xae, 0x02, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x04, 0x66, 0x72, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x0c, 0x75, 0x73, 0x65, - 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, - 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e, 0x6f, - 0x64, 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, - 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, - 0x64, 0x65, 0x73, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, - 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x47, 0x0a, 0x13, 0x69, 0x6e, - 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, + 0x00, 0x52, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x6e, 0x69, 0x63, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x69, + 0x6f, 0x77, 0x61, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, + 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x06, 0x69, 0x6f, 0x77, + 0x61, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x69, 0x72, 0x71, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, + 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x52, 0x03, 0x69, 0x72, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x6f, 0x66, 0x74, 0x69, 0x72, 0x71, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x73, 0x6f, 0x66, 0x74, 0x69, 0x72, 0x71, 0x12, + 0x24, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, + 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x65, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x67, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x67, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x42, + 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, + 0x09, 0x67, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x69, 0x63, 0x65, 0x22, 0xeb, 0x01, 0x0a, 0x06, 0x4d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x61, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x3a, 0x0a, + 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0b, 0x75, 0x73, + 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x14, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x52, 0x11, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x22, 0xa6, 0x01, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x28, 0x0a, - 0x0b, 0x67, 0x69, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x67, 0x69, 0x74, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, - 0x26, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x67, 0x6f, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x2b, 0x0a, 0x10, - 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, 0xa8, 0x04, 0x0a, 0x09, 0x53, 0x63, + 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x12, 0x74, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x75, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x54, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, + 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x21, 0x0a, 0x0c, + 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x22, + 0xae, 0x02, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, + 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, + 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, + 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, + 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x6f, + 0x64, 0x65, 0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x47, 0x0a, 0x13, 0x69, 0x6e, 0x6f, 0x64, 0x65, + 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x11, 0x69, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x22, 0xa6, 0x01, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0b, 0x67, 0x69, + 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x67, 0x69, 0x74, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x26, 0x0a, 0x0a, + 0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x32, 0xa8, 0x04, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, @@ -2470,18 +2470,18 @@ var file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc = []byte{ 0x70, 0x6f, 0x72, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3a, 0x0a, - 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x15, 0x2e, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x08, 0x53, 0x74, 0x61, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x46, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x41, - 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x46, 0x0a, + 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, + 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3a, + 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x15, 0x2e, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, @@ -2517,18 +2517,18 @@ var file_pkg_apis_scheduler_v1_scheduler_proto_goTypes = []interface{}{ (*PieceResult)(nil), // 4: scheduler.PieceResult (*PeerPacket)(nil), // 5: scheduler.PeerPacket (*PeerResult)(nil), // 6: scheduler.PeerResult - (*PeerTarget)(nil), // 7: scheduler.PeerTarget + (*AnnounceTaskRequest)(nil), // 7: scheduler.AnnounceTaskRequest (*StatTaskRequest)(nil), // 8: scheduler.StatTaskRequest (*Task)(nil), // 9: scheduler.Task - (*AnnounceTaskRequest)(nil), // 10: scheduler.AnnounceTaskRequest - (*AnnounceHostRequest)(nil), // 11: scheduler.AnnounceHostRequest - (*CPU)(nil), // 12: scheduler.CPU - (*CPUTimes)(nil), // 13: scheduler.CPUTimes - (*Memory)(nil), // 14: scheduler.Memory - (*Network)(nil), // 15: scheduler.Network - (*Disk)(nil), // 16: scheduler.Disk - (*Build)(nil), // 17: scheduler.Build - (*LeaveHostRequest)(nil), // 18: scheduler.LeaveHostRequest + (*PeerTarget)(nil), // 10: scheduler.PeerTarget + (*LeaveHostRequest)(nil), // 11: scheduler.LeaveHostRequest + (*AnnounceHostRequest)(nil), // 12: scheduler.AnnounceHostRequest + (*CPU)(nil), // 13: scheduler.CPU + (*CPUTimes)(nil), // 14: scheduler.CPUTimes + (*Memory)(nil), // 15: scheduler.Memory + (*Network)(nil), // 16: scheduler.Network + (*Disk)(nil), // 17: scheduler.Disk + (*Build)(nil), // 18: scheduler.Build (*PeerPacket_DestPeer)(nil), // 19: scheduler.PeerPacket.DestPeer (*v1.UrlMeta)(nil), // 20: common.UrlMeta (*v1.HostLoad)(nil), // 21: common.HostLoad @@ -2562,31 +2562,31 @@ var file_pkg_apis_scheduler_v1_scheduler_proto_depIdxs = []int32{ 28, // 16: scheduler.PeerPacket.source_error:type_name -> errordetails.SourceError 27, // 17: scheduler.PeerResult.code:type_name -> common.Code 28, // 18: scheduler.PeerResult.source_error:type_name -> errordetails.SourceError - 23, // 19: scheduler.Task.type:type_name -> common.TaskType - 20, // 20: scheduler.AnnounceTaskRequest.url_meta:type_name -> common.UrlMeta - 3, // 21: scheduler.AnnounceTaskRequest.peer_host:type_name -> scheduler.PeerHost - 29, // 22: scheduler.AnnounceTaskRequest.piece_packet:type_name -> common.PiecePacket - 23, // 23: scheduler.AnnounceTaskRequest.task_type:type_name -> common.TaskType - 12, // 24: scheduler.AnnounceHostRequest.cpu:type_name -> scheduler.CPU - 14, // 25: scheduler.AnnounceHostRequest.memory:type_name -> scheduler.Memory - 15, // 26: scheduler.AnnounceHostRequest.network:type_name -> scheduler.Network - 16, // 27: scheduler.AnnounceHostRequest.disk:type_name -> scheduler.Disk - 17, // 28: scheduler.AnnounceHostRequest.build:type_name -> scheduler.Build - 13, // 29: scheduler.CPU.times:type_name -> scheduler.CPUTimes + 20, // 19: scheduler.AnnounceTaskRequest.url_meta:type_name -> common.UrlMeta + 3, // 20: scheduler.AnnounceTaskRequest.peer_host:type_name -> scheduler.PeerHost + 29, // 21: scheduler.AnnounceTaskRequest.piece_packet:type_name -> common.PiecePacket + 23, // 22: scheduler.AnnounceTaskRequest.task_type:type_name -> common.TaskType + 23, // 23: scheduler.Task.type:type_name -> common.TaskType + 13, // 24: scheduler.AnnounceHostRequest.cpu:type_name -> scheduler.CPU + 15, // 25: scheduler.AnnounceHostRequest.memory:type_name -> scheduler.Memory + 16, // 26: scheduler.AnnounceHostRequest.network:type_name -> scheduler.Network + 17, // 27: scheduler.AnnounceHostRequest.disk:type_name -> scheduler.Disk + 18, // 28: scheduler.AnnounceHostRequest.build:type_name -> scheduler.Build + 14, // 29: scheduler.CPU.times:type_name -> scheduler.CPUTimes 0, // 30: scheduler.Scheduler.RegisterPeerTask:input_type -> scheduler.PeerTaskRequest 4, // 31: scheduler.Scheduler.ReportPieceResult:input_type -> scheduler.PieceResult 6, // 32: scheduler.Scheduler.ReportPeerResult:input_type -> scheduler.PeerResult - 7, // 33: scheduler.Scheduler.LeaveTask:input_type -> scheduler.PeerTarget + 7, // 33: scheduler.Scheduler.AnnounceTask:input_type -> scheduler.AnnounceTaskRequest 8, // 34: scheduler.Scheduler.StatTask:input_type -> scheduler.StatTaskRequest - 10, // 35: scheduler.Scheduler.AnnounceTask:input_type -> scheduler.AnnounceTaskRequest - 11, // 36: scheduler.Scheduler.AnnounceHost:input_type -> scheduler.AnnounceHostRequest - 18, // 37: scheduler.Scheduler.LeaveHost:input_type -> scheduler.LeaveHostRequest + 10, // 35: scheduler.Scheduler.LeaveTask:input_type -> scheduler.PeerTarget + 12, // 36: scheduler.Scheduler.AnnounceHost:input_type -> scheduler.AnnounceHostRequest + 11, // 37: scheduler.Scheduler.LeaveHost:input_type -> scheduler.LeaveHostRequest 1, // 38: scheduler.Scheduler.RegisterPeerTask:output_type -> scheduler.RegisterResult 5, // 39: scheduler.Scheduler.ReportPieceResult:output_type -> scheduler.PeerPacket 30, // 40: scheduler.Scheduler.ReportPeerResult:output_type -> google.protobuf.Empty - 30, // 41: scheduler.Scheduler.LeaveTask:output_type -> google.protobuf.Empty + 30, // 41: scheduler.Scheduler.AnnounceTask:output_type -> google.protobuf.Empty 9, // 42: scheduler.Scheduler.StatTask:output_type -> scheduler.Task - 30, // 43: scheduler.Scheduler.AnnounceTask:output_type -> google.protobuf.Empty + 30, // 43: scheduler.Scheduler.LeaveTask:output_type -> google.protobuf.Empty 30, // 44: scheduler.Scheduler.AnnounceHost:output_type -> google.protobuf.Empty 30, // 45: scheduler.Scheduler.LeaveHost:output_type -> google.protobuf.Empty 38, // [38:46] is the sub-list for method output_type @@ -2687,7 +2687,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerTarget); i { + switch v := v.(*AnnounceTaskRequest); i { case 0: return &v.state case 1: @@ -2723,7 +2723,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AnnounceTaskRequest); i { + switch v := v.(*PeerTarget); i { case 0: return &v.state case 1: @@ -2735,7 +2735,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AnnounceHostRequest); i { + switch v := v.(*LeaveHostRequest); i { case 0: return &v.state case 1: @@ -2747,7 +2747,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CPU); i { + switch v := v.(*AnnounceHostRequest); i { case 0: return &v.state case 1: @@ -2759,7 +2759,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CPUTimes); i { + switch v := v.(*CPU); i { case 0: return &v.state case 1: @@ -2771,7 +2771,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Memory); i { + switch v := v.(*CPUTimes); i { case 0: return &v.state case 1: @@ -2783,7 +2783,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Network); i { + switch v := v.(*Memory); i { case 0: return &v.state case 1: @@ -2795,7 +2795,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Disk); i { + switch v := v.(*Network); i { case 0: return &v.state case 1: @@ -2807,7 +2807,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Build); i { + switch v := v.(*Disk); i { case 0: return &v.state case 1: @@ -2819,7 +2819,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() { } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeaveHostRequest); i { + switch v := v.(*Build); i { case 0: return &v.state case 1: @@ -2891,12 +2891,12 @@ type SchedulerClient interface { ReportPieceResult(ctx context.Context, opts ...grpc.CallOption) (Scheduler_ReportPieceResultClient, error) // ReportPeerResult reports downloading result for the peer. ReportPeerResult(ctx context.Context, in *PeerResult, opts ...grpc.CallOption) (*emptypb.Empty, error) - // LeaveTask makes the peer leaving from task. - LeaveTask(ctx context.Context, in *PeerTarget, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Checks if any peer has the given task. - StatTask(ctx context.Context, in *StatTaskRequest, opts ...grpc.CallOption) (*Task, error) // A peer announces that it has the announced task to other peers. AnnounceTask(ctx context.Context, in *AnnounceTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Checks if any peer has the given task. + StatTask(ctx context.Context, in *StatTaskRequest, opts ...grpc.CallOption) (*Task, error) + // LeaveTask makes the peer leaving from task. + LeaveTask(ctx context.Context, in *PeerTarget, opts ...grpc.CallOption) (*emptypb.Empty, error) // AnnounceHost announces host to scheduler. AnnounceHost(ctx context.Context, in *AnnounceHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // LeaveHost makes the peers leaving from host. @@ -2960,9 +2960,9 @@ func (c *schedulerClient) ReportPeerResult(ctx context.Context, in *PeerResult, return out, nil } -func (c *schedulerClient) LeaveTask(ctx context.Context, in *PeerTarget, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *schedulerClient) AnnounceTask(ctx context.Context, in *AnnounceTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/scheduler.Scheduler/LeaveTask", in, out, opts...) + err := c.cc.Invoke(ctx, "/scheduler.Scheduler/AnnounceTask", in, out, opts...) if err != nil { return nil, err } @@ -2978,9 +2978,9 @@ func (c *schedulerClient) StatTask(ctx context.Context, in *StatTaskRequest, opt return out, nil } -func (c *schedulerClient) AnnounceTask(ctx context.Context, in *AnnounceTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *schedulerClient) LeaveTask(ctx context.Context, in *PeerTarget, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/scheduler.Scheduler/AnnounceTask", in, out, opts...) + err := c.cc.Invoke(ctx, "/scheduler.Scheduler/LeaveTask", in, out, opts...) if err != nil { return nil, err } @@ -3013,12 +3013,12 @@ type SchedulerServer interface { ReportPieceResult(Scheduler_ReportPieceResultServer) error // ReportPeerResult reports downloading result for the peer. ReportPeerResult(context.Context, *PeerResult) (*emptypb.Empty, error) - // LeaveTask makes the peer leaving from task. - LeaveTask(context.Context, *PeerTarget) (*emptypb.Empty, error) - // Checks if any peer has the given task. - StatTask(context.Context, *StatTaskRequest) (*Task, error) // A peer announces that it has the announced task to other peers. AnnounceTask(context.Context, *AnnounceTaskRequest) (*emptypb.Empty, error) + // Checks if any peer has the given task. + StatTask(context.Context, *StatTaskRequest) (*Task, error) + // LeaveTask makes the peer leaving from task. + LeaveTask(context.Context, *PeerTarget) (*emptypb.Empty, error) // AnnounceHost announces host to scheduler. AnnounceHost(context.Context, *AnnounceHostRequest) (*emptypb.Empty, error) // LeaveHost makes the peers leaving from host. @@ -3038,14 +3038,14 @@ func (*UnimplementedSchedulerServer) ReportPieceResult(Scheduler_ReportPieceResu func (*UnimplementedSchedulerServer) ReportPeerResult(context.Context, *PeerResult) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ReportPeerResult not implemented") } -func (*UnimplementedSchedulerServer) LeaveTask(context.Context, *PeerTarget) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method LeaveTask not implemented") +func (*UnimplementedSchedulerServer) AnnounceTask(context.Context, *AnnounceTaskRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method AnnounceTask not implemented") } func (*UnimplementedSchedulerServer) StatTask(context.Context, *StatTaskRequest) (*Task, error) { return nil, status.Errorf(codes.Unimplemented, "method StatTask not implemented") } -func (*UnimplementedSchedulerServer) AnnounceTask(context.Context, *AnnounceTaskRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method AnnounceTask not implemented") +func (*UnimplementedSchedulerServer) LeaveTask(context.Context, *PeerTarget) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method LeaveTask not implemented") } func (*UnimplementedSchedulerServer) AnnounceHost(context.Context, *AnnounceHostRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AnnounceHost not implemented") @@ -3120,20 +3120,20 @@ func _Scheduler_ReportPeerResult_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _Scheduler_LeaveTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PeerTarget) +func _Scheduler_AnnounceTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AnnounceTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SchedulerServer).LeaveTask(ctx, in) + return srv.(SchedulerServer).AnnounceTask(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/scheduler.Scheduler/LeaveTask", + FullMethod: "/scheduler.Scheduler/AnnounceTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SchedulerServer).LeaveTask(ctx, req.(*PeerTarget)) + return srv.(SchedulerServer).AnnounceTask(ctx, req.(*AnnounceTaskRequest)) } return interceptor(ctx, in, info, handler) } @@ -3156,20 +3156,20 @@ func _Scheduler_StatTask_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Scheduler_AnnounceTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AnnounceTaskRequest) +func _Scheduler_LeaveTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PeerTarget) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SchedulerServer).AnnounceTask(ctx, in) + return srv.(SchedulerServer).LeaveTask(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/scheduler.Scheduler/AnnounceTask", + FullMethod: "/scheduler.Scheduler/LeaveTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SchedulerServer).AnnounceTask(ctx, req.(*AnnounceTaskRequest)) + return srv.(SchedulerServer).LeaveTask(ctx, req.(*PeerTarget)) } return interceptor(ctx, in, info, handler) } @@ -3223,16 +3223,16 @@ var _Scheduler_serviceDesc = grpc.ServiceDesc{ Handler: _Scheduler_ReportPeerResult_Handler, }, { - MethodName: "LeaveTask", - Handler: _Scheduler_LeaveTask_Handler, + MethodName: "AnnounceTask", + Handler: _Scheduler_AnnounceTask_Handler, }, { MethodName: "StatTask", Handler: _Scheduler_StatTask_Handler, }, { - MethodName: "AnnounceTask", - Handler: _Scheduler_AnnounceTask_Handler, + MethodName: "LeaveTask", + Handler: _Scheduler_LeaveTask_Handler, }, { MethodName: "AnnounceHost", diff --git a/pkg/apis/scheduler/v1/scheduler.pb.validate.go b/pkg/apis/scheduler/v1/scheduler.pb.validate.go index b93abdd..15c2118 100644 --- a/pkg/apis/scheduler/v1/scheduler.pb.validate.go +++ b/pkg/apis/scheduler/v1/scheduler.pb.validate.go @@ -1470,22 +1470,22 @@ var _ interface { ErrorName() string } = PeerResultValidationError{} -// Validate checks the field values on PeerTarget with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *PeerTarget) Validate() error { +// Validate checks the field values on AnnounceTaskRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AnnounceTaskRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on PeerTarget with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in PeerTargetMultiError, or -// nil if none found. -func (m *PeerTarget) ValidateAll() error { +// ValidateAll checks the field values on AnnounceTaskRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AnnounceTaskRequestMultiError, or nil if none found. +func (m *AnnounceTaskRequest) ValidateAll() error { return m.validate(true) } -func (m *PeerTarget) validate(all bool) error { +func (m *AnnounceTaskRequest) validate(all bool) error { if m == nil { return nil } @@ -1493,7 +1493,7 @@ func (m *PeerTarget) validate(all bool) error { var errors []error if utf8.RuneCountInString(m.GetTaskId()) < 1 { - err := PeerTargetValidationError{ + err := AnnounceTaskRequestValidationError{ field: "TaskId", reason: "value length must be at least 1 runes", } @@ -1503,10 +1503,35 @@ func (m *PeerTarget) validate(all bool) error { errors = append(errors, err) } - if utf8.RuneCountInString(m.GetPeerId()) < 1 { - err := PeerTargetValidationError{ - field: "PeerId", - reason: "value length must be at least 1 runes", + if m.GetUrl() != "" { + + if uri, err := url.Parse(m.GetUrl()); err != nil { + err = AnnounceTaskRequestValidationError{ + field: "Url", + reason: "value must be a valid URI", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else if !uri.IsAbs() { + err := AnnounceTaskRequestValidationError{ + field: "Url", + reason: "value must be absolute", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if m.GetUrlMeta() == nil { + err := AnnounceTaskRequestValidationError{ + field: "UrlMeta", + reason: "value is required", } if !all { return err @@ -1514,19 +1539,120 @@ func (m *PeerTarget) validate(all bool) error { errors = append(errors, err) } + if all { + switch v := interface{}(m.GetUrlMeta()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AnnounceTaskRequestValidationError{ + field: "UrlMeta", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AnnounceTaskRequestValidationError{ + field: "UrlMeta", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUrlMeta()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AnnounceTaskRequestValidationError{ + field: "UrlMeta", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetPeerHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AnnounceTaskRequestValidationError{ + field: "PeerHost", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AnnounceTaskRequestValidationError{ + field: "PeerHost", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPeerHost()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AnnounceTaskRequestValidationError{ + field: "PeerHost", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetPiecePacket() == nil { + err := AnnounceTaskRequestValidationError{ + field: "PiecePacket", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetPiecePacket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AnnounceTaskRequestValidationError{ + field: "PiecePacket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AnnounceTaskRequestValidationError{ + field: "PiecePacket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPiecePacket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AnnounceTaskRequestValidationError{ + field: "PiecePacket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for TaskType + if len(errors) > 0 { - return PeerTargetMultiError(errors) + return AnnounceTaskRequestMultiError(errors) } return nil } -// PeerTargetMultiError is an error wrapping multiple validation errors -// returned by PeerTarget.ValidateAll() if the designated constraints aren't met. -type PeerTargetMultiError []error +// AnnounceTaskRequestMultiError is an error wrapping multiple validation +// errors returned by AnnounceTaskRequest.ValidateAll() if the designated +// constraints aren't met. +type AnnounceTaskRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m PeerTargetMultiError) Error() string { +func (m AnnounceTaskRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -1535,11 +1661,11 @@ func (m PeerTargetMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m PeerTargetMultiError) AllErrors() []error { return m } +func (m AnnounceTaskRequestMultiError) AllErrors() []error { return m } -// PeerTargetValidationError is the validation error returned by -// PeerTarget.Validate if the designated constraints aren't met. -type PeerTargetValidationError struct { +// AnnounceTaskRequestValidationError is the validation error returned by +// AnnounceTaskRequest.Validate if the designated constraints aren't met. +type AnnounceTaskRequestValidationError struct { field string reason string cause error @@ -1547,22 +1673,24 @@ type PeerTargetValidationError struct { } // Field function returns field value. -func (e PeerTargetValidationError) Field() string { return e.field } +func (e AnnounceTaskRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e PeerTargetValidationError) Reason() string { return e.reason } +func (e AnnounceTaskRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e PeerTargetValidationError) Cause() error { return e.cause } +func (e AnnounceTaskRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e PeerTargetValidationError) Key() bool { return e.key } +func (e AnnounceTaskRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e PeerTargetValidationError) ErrorName() string { return "PeerTargetValidationError" } +func (e AnnounceTaskRequestValidationError) ErrorName() string { + return "AnnounceTaskRequestValidationError" +} // Error satisfies the builtin error interface -func (e PeerTargetValidationError) Error() string { +func (e AnnounceTaskRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1574,14 +1702,14 @@ func (e PeerTargetValidationError) Error() string { } return fmt.Sprintf( - "invalid %sPeerTarget.%s: %s%s", + "invalid %sAnnounceTaskRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = PeerTargetValidationError{} +var _ error = AnnounceTaskRequestValidationError{} var _ interface { Field() string @@ -1589,7 +1717,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = PeerTargetValidationError{} +} = AnnounceTaskRequestValidationError{} // Validate checks the field values on StatTaskRequest with the rules defined // in the proto definition for this message. If any rules are violated, the @@ -1859,22 +1987,22 @@ var _ interface { ErrorName() string } = TaskValidationError{} -// Validate checks the field values on AnnounceTaskRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *AnnounceTaskRequest) Validate() error { +// Validate checks the field values on PeerTarget with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *PeerTarget) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on AnnounceTaskRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AnnounceTaskRequestMultiError, or nil if none found. -func (m *AnnounceTaskRequest) ValidateAll() error { +// ValidateAll checks the field values on PeerTarget with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PeerTargetMultiError, or +// nil if none found. +func (m *PeerTarget) ValidateAll() error { return m.validate(true) } -func (m *AnnounceTaskRequest) validate(all bool) error { +func (m *PeerTarget) validate(all bool) error { if m == nil { return nil } @@ -1882,7 +2010,7 @@ func (m *AnnounceTaskRequest) validate(all bool) error { var errors []error if utf8.RuneCountInString(m.GetTaskId()) < 1 { - err := AnnounceTaskRequestValidationError{ + err := PeerTargetValidationError{ field: "TaskId", reason: "value length must be at least 1 runes", } @@ -1892,35 +2020,10 @@ func (m *AnnounceTaskRequest) validate(all bool) error { errors = append(errors, err) } - if m.GetUrl() != "" { - - if uri, err := url.Parse(m.GetUrl()); err != nil { - err = AnnounceTaskRequestValidationError{ - field: "Url", - reason: "value must be a valid URI", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else if !uri.IsAbs() { - err := AnnounceTaskRequestValidationError{ - field: "Url", - reason: "value must be absolute", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if m.GetUrlMeta() == nil { - err := AnnounceTaskRequestValidationError{ - field: "UrlMeta", - reason: "value is required", + if utf8.RuneCountInString(m.GetPeerId()) < 1 { + err := PeerTargetValidationError{ + field: "PeerId", + reason: "value length must be at least 1 runes", } if !all { return err @@ -1928,120 +2031,19 @@ func (m *AnnounceTaskRequest) validate(all bool) error { errors = append(errors, err) } - if all { - switch v := interface{}(m.GetUrlMeta()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AnnounceTaskRequestValidationError{ - field: "UrlMeta", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AnnounceTaskRequestValidationError{ - field: "UrlMeta", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUrlMeta()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AnnounceTaskRequestValidationError{ - field: "UrlMeta", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPeerHost()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AnnounceTaskRequestValidationError{ - field: "PeerHost", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AnnounceTaskRequestValidationError{ - field: "PeerHost", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPeerHost()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AnnounceTaskRequestValidationError{ - field: "PeerHost", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetPiecePacket() == nil { - err := AnnounceTaskRequestValidationError{ - field: "PiecePacket", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetPiecePacket()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AnnounceTaskRequestValidationError{ - field: "PiecePacket", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AnnounceTaskRequestValidationError{ - field: "PiecePacket", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPiecePacket()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AnnounceTaskRequestValidationError{ - field: "PiecePacket", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TaskType - if len(errors) > 0 { - return AnnounceTaskRequestMultiError(errors) + return PeerTargetMultiError(errors) } return nil } -// AnnounceTaskRequestMultiError is an error wrapping multiple validation -// errors returned by AnnounceTaskRequest.ValidateAll() if the designated -// constraints aren't met. -type AnnounceTaskRequestMultiError []error +// PeerTargetMultiError is an error wrapping multiple validation errors +// returned by PeerTarget.ValidateAll() if the designated constraints aren't met. +type PeerTargetMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m AnnounceTaskRequestMultiError) Error() string { +func (m PeerTargetMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -2050,11 +2052,11 @@ func (m AnnounceTaskRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m AnnounceTaskRequestMultiError) AllErrors() []error { return m } +func (m PeerTargetMultiError) AllErrors() []error { return m } -// AnnounceTaskRequestValidationError is the validation error returned by -// AnnounceTaskRequest.Validate if the designated constraints aren't met. -type AnnounceTaskRequestValidationError struct { +// PeerTargetValidationError is the validation error returned by +// PeerTarget.Validate if the designated constraints aren't met. +type PeerTargetValidationError struct { field string reason string cause error @@ -2062,24 +2064,22 @@ type AnnounceTaskRequestValidationError struct { } // Field function returns field value. -func (e AnnounceTaskRequestValidationError) Field() string { return e.field } +func (e PeerTargetValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e AnnounceTaskRequestValidationError) Reason() string { return e.reason } +func (e PeerTargetValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e AnnounceTaskRequestValidationError) Cause() error { return e.cause } +func (e PeerTargetValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e AnnounceTaskRequestValidationError) Key() bool { return e.key } +func (e PeerTargetValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e AnnounceTaskRequestValidationError) ErrorName() string { - return "AnnounceTaskRequestValidationError" -} +func (e PeerTargetValidationError) ErrorName() string { return "PeerTargetValidationError" } // Error satisfies the builtin error interface -func (e AnnounceTaskRequestValidationError) Error() string { +func (e PeerTargetValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2091,14 +2091,14 @@ func (e AnnounceTaskRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sAnnounceTaskRequest.%s: %s%s", + "invalid %sPeerTarget.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = AnnounceTaskRequestValidationError{} +var _ error = PeerTargetValidationError{} var _ interface { Field() string @@ -2106,7 +2106,118 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = AnnounceTaskRequestValidationError{} +} = PeerTargetValidationError{} + +// Validate checks the field values on LeaveHostRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *LeaveHostRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LeaveHostRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LeaveHostRequestMultiError, or nil if none found. +func (m *LeaveHostRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *LeaveHostRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetId()) < 1 { + err := LeaveHostRequestValidationError{ + field: "Id", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return LeaveHostRequestMultiError(errors) + } + + return nil +} + +// LeaveHostRequestMultiError is an error wrapping multiple validation errors +// returned by LeaveHostRequest.ValidateAll() if the designated constraints +// aren't met. +type LeaveHostRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LeaveHostRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LeaveHostRequestMultiError) AllErrors() []error { return m } + +// LeaveHostRequestValidationError is the validation error returned by +// LeaveHostRequest.Validate if the designated constraints aren't met. +type LeaveHostRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LeaveHostRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LeaveHostRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LeaveHostRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LeaveHostRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LeaveHostRequestValidationError) ErrorName() string { return "LeaveHostRequestValidationError" } + +// Error satisfies the builtin error interface +func (e LeaveHostRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sLeaveHostRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LeaveHostRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LeaveHostRequestValidationError{} // Validate checks the field values on AnnounceHostRequest with the rules // defined in the proto definition for this message. If any rules are @@ -3405,117 +3516,6 @@ var _ interface { ErrorName() string } = BuildValidationError{} -// Validate checks the field values on LeaveHostRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *LeaveHostRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LeaveHostRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// LeaveHostRequestMultiError, or nil if none found. -func (m *LeaveHostRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *LeaveHostRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetId()) < 1 { - err := LeaveHostRequestValidationError{ - field: "Id", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return LeaveHostRequestMultiError(errors) - } - - return nil -} - -// LeaveHostRequestMultiError is an error wrapping multiple validation errors -// returned by LeaveHostRequest.ValidateAll() if the designated constraints -// aren't met. -type LeaveHostRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LeaveHostRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LeaveHostRequestMultiError) AllErrors() []error { return m } - -// LeaveHostRequestValidationError is the validation error returned by -// LeaveHostRequest.Validate if the designated constraints aren't met. -type LeaveHostRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LeaveHostRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LeaveHostRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LeaveHostRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LeaveHostRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LeaveHostRequestValidationError) ErrorName() string { return "LeaveHostRequestValidationError" } - -// Error satisfies the builtin error interface -func (e LeaveHostRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLeaveHostRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LeaveHostRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LeaveHostRequestValidationError{} - // Validate checks the field values on PeerPacket_DestPeer with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. diff --git a/pkg/apis/scheduler/v1/scheduler.proto b/pkg/apis/scheduler/v1/scheduler.proto index 8861449..d78e996 100644 --- a/pkg/apis/scheduler/v1/scheduler.proto +++ b/pkg/apis/scheduler/v1/scheduler.proto @@ -187,12 +187,20 @@ message PeerResult{ } } -// PeerTarget represents request of LeaveTask. -message PeerTarget{ +// AnnounceTaskRequest represents request of AnnounceTask. +message AnnounceTaskRequest{ // Task id. string task_id = 1 [(validate.rules).string.min_len = 1]; - // Peer id. - string peer_id = 2 [(validate.rules).string.min_len = 1]; + // Download url. + string url = 2 [(validate.rules).string = {uri: true, ignore_empty: true}]; + // URL meta info. + common.UrlMeta url_meta = 3 [(validate.rules).message.required = true]; + // Peer host info. + PeerHost peer_host = 4; + // Task piece info. + common.PiecePacket piece_packet = 5 [(validate.rules).message.required = true]; + // Task type. + common.TaskType task_type = 6; } // StatTaskRequest represents request of StatTask. @@ -219,20 +227,18 @@ message Task{ bool hasAvailablePeer = 7; } -// AnnounceTaskRequest represents request of AnnounceTask. -message AnnounceTaskRequest{ +// PeerTarget represents request of LeaveTask. +message PeerTarget{ // Task id. string task_id = 1 [(validate.rules).string.min_len = 1]; - // Download url. - string url = 2 [(validate.rules).string = {uri: true, ignore_empty: true}]; - // URL meta info. - common.UrlMeta url_meta = 3 [(validate.rules).message.required = true]; - // Peer host info. - PeerHost peer_host = 4; - // Task piece info. - common.PiecePacket piece_packet = 5 [(validate.rules).message.required = true]; - // Task type. - common.TaskType task_type = 6; + // Peer id. + string peer_id = 2 [(validate.rules).string.min_len = 1]; +} + +// LeaveHostRequest represents request of LeaveHost. +message LeaveHostRequest{ + // Host id. + string id = 1 [(validate.rules).string.min_len = 1]; } // AnnounceHostRequest represents request of AnnounceHost. @@ -372,12 +378,6 @@ message Build { string platform = 4 [(validate.rules).string.min_len = 1]; } -// LeaveHostRequest represents request of LeaveHost. -message LeaveHostRequest{ - // Host id. - string id = 1 [(validate.rules).string.min_len = 1]; -} - // Scheduler RPC Service. service Scheduler{ // RegisterPeerTask registers a peer into task. @@ -389,14 +389,14 @@ service Scheduler{ // ReportPeerResult reports downloading result for the peer. rpc ReportPeerResult(PeerResult)returns(google.protobuf.Empty); - // LeaveTask makes the peer leaving from task. - rpc LeaveTask(PeerTarget)returns(google.protobuf.Empty); + // A peer announces that it has the announced task to other peers. + rpc AnnounceTask(AnnounceTaskRequest) returns(google.protobuf.Empty); // Checks if any peer has the given task. rpc StatTask(StatTaskRequest)returns(Task); - // A peer announces that it has the announced task to other peers. - rpc AnnounceTask(AnnounceTaskRequest) returns(google.protobuf.Empty); + // LeaveTask makes the peer leaving from task. + rpc LeaveTask(PeerTarget)returns(google.protobuf.Empty); // AnnounceHost announces host to scheduler. rpc AnnounceHost(AnnounceHostRequest)returns(google.protobuf.Empty);