From 7998f59978f5c5e92f3bb46751f9bf32c732a2c8 Mon Sep 17 00:00:00 2001 From: Gaius Date: Mon, 8 Jul 2024 12:36:22 +0800 Subject: [PATCH] feat: change UploadCacheTask message (#338) Signed-off-by: Gaius --- Cargo.lock | 2 +- Cargo.toml | 2 +- pkg/apis/scheduler/v2/scheduler.pb.go | 612 +++++++----------- .../scheduler/v2/scheduler.pb.validate.go | 310 +-------- pkg/apis/scheduler/v2/scheduler.proto | 62 +- pkg/apis/scheduler/v2/scheduler_grpc.pb.go | 154 +++-- proto/scheduler.proto | 62 +- src/descriptor.bin | Bin 93896 -> 93649 bytes src/scheduler.v2.rs | 285 +++++--- 9 files changed, 640 insertions(+), 849 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f22f099..9e6c302 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -160,7 +160,7 @@ dependencies = [ [[package]] name = "dragonfly-api" -version = "2.0.128" +version = "2.0.129" dependencies = [ "prost 0.11.9", "prost-types 0.12.6", diff --git a/Cargo.toml b/Cargo.toml index 53efa64..91ce81f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dragonfly-api" -version = "2.0.128" +version = "2.0.129" authors = ["Gaius "] edition = "2021" license = "Apache-2.0" diff --git a/pkg/apis/scheduler/v2/scheduler.pb.go b/pkg/apis/scheduler/v2/scheduler.pb.go index f4f4bad..1dd23e6 100644 --- a/pkg/apis/scheduler/v2/scheduler.pb.go +++ b/pkg/apis/scheduler/v2/scheduler.pb.go @@ -2724,24 +2724,30 @@ func (x *DeleteCachePeerRequest) GetPeerId() string { return "" } -// UploadCacheTaskStartedRequest represents upload cache task started request of UploadCacheTaskRequest. +// UploadCacheTaskStartedRequest represents upload cache task started request of UploadCacheTaskStartedRequest. type UploadCacheTaskStartedRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Host id. + HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` + // Task id. + TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // Peer id. + PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` // Replica count of the persistent cache task. - PersistentReplicaCount uint64 `protobuf:"varint,1,opt,name=persistent_replica_count,json=persistentReplicaCount,proto3" json:"persistent_replica_count,omitempty"` + PersistentReplicaCount uint64 `protobuf:"varint,4,opt,name=persistent_replica_count,json=persistentReplicaCount,proto3" json:"persistent_replica_count,omitempty"` // Tag is used to distinguish different cache tasks. - Tag *string `protobuf:"bytes,2,opt,name=tag,proto3,oneof" json:"tag,omitempty"` + Tag *string `protobuf:"bytes,5,opt,name=tag,proto3,oneof" json:"tag,omitempty"` // Application of task. - Application *string `protobuf:"bytes,3,opt,name=application,proto3,oneof" json:"application,omitempty"` + Application *string `protobuf:"bytes,6,opt,name=application,proto3,oneof" json:"application,omitempty"` // Task piece length. - PieceLength uint64 `protobuf:"varint,4,opt,name=piece_length,json=pieceLength,proto3" json:"piece_length,omitempty"` + PieceLength uint64 `protobuf:"varint,7,opt,name=piece_length,json=pieceLength,proto3" json:"piece_length,omitempty"` // TTL of the cache task. - Ttl *durationpb.Duration `protobuf:"bytes,5,opt,name=ttl,proto3" json:"ttl,omitempty"` + Ttl *durationpb.Duration `protobuf:"bytes,8,opt,name=ttl,proto3" json:"ttl,omitempty"` // Upload timeout. - Timeout *durationpb.Duration `protobuf:"bytes,6,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"` + Timeout *durationpb.Duration `protobuf:"bytes,9,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"` } func (x *UploadCacheTaskStartedRequest) Reset() { @@ -2776,6 +2782,27 @@ func (*UploadCacheTaskStartedRequest) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{41} } +func (x *UploadCacheTaskStartedRequest) GetHostId() string { + if x != nil { + return x.HostId + } + return "" +} + +func (x *UploadCacheTaskStartedRequest) GetTaskId() string { + if x != nil { + return x.TaskId + } + return "" +} + +func (x *UploadCacheTaskStartedRequest) GetPeerId() string { + if x != nil { + return x.PeerId + } + return "" +} + func (x *UploadCacheTaskStartedRequest) GetPersistentReplicaCount() uint64 { if x != nil { return x.PersistentReplicaCount @@ -2818,7 +2845,7 @@ func (x *UploadCacheTaskStartedRequest) GetTimeout() *durationpb.Duration { return nil } -// UploadCacheTaskFinishedRequest represents upload cache task finished request of UploadCacheTaskRequest. +// UploadCacheTaskFinishedRequest represents upload cache task finished request of UploadCacheTaskFinishedRequest. type UploadCacheTaskFinishedRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2857,7 +2884,7 @@ func (*UploadCacheTaskFinishedRequest) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{42} } -// UploadCacheTaskFailedRequest represents upload cache task failed request of UploadCacheTaskRequest. +// UploadCacheTaskFailedRequest represents upload cache task failed request of UploadCacheTaskFailedRequest. type UploadCacheTaskFailedRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2906,129 +2933,6 @@ func (x *UploadCacheTaskFailedRequest) GetDescription() string { return "" } -// UploadCacheTaskRequest represents request of UploadCacheTask. -type UploadCacheTaskRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Host id. - HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` - // Task id. - TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // Peer id. - PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` - // Types that are assignable to Request: - // - // *UploadCacheTaskRequest_UploadCacheTaskStartedRequest - // *UploadCacheTaskRequest_UploadCacheTaskFinishedRequest - // *UploadCacheTaskRequest_UploadCacheTaskFailedRequest - Request isUploadCacheTaskRequest_Request `protobuf_oneof:"request"` -} - -func (x *UploadCacheTaskRequest) Reset() { - *x = UploadCacheTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UploadCacheTaskRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UploadCacheTaskRequest) ProtoMessage() {} - -func (x *UploadCacheTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[44] - 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 UploadCacheTaskRequest.ProtoReflect.Descriptor instead. -func (*UploadCacheTaskRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{44} -} - -func (x *UploadCacheTaskRequest) GetHostId() string { - if x != nil { - return x.HostId - } - return "" -} - -func (x *UploadCacheTaskRequest) GetTaskId() string { - if x != nil { - return x.TaskId - } - return "" -} - -func (x *UploadCacheTaskRequest) GetPeerId() string { - if x != nil { - return x.PeerId - } - return "" -} - -func (m *UploadCacheTaskRequest) GetRequest() isUploadCacheTaskRequest_Request { - if m != nil { - return m.Request - } - return nil -} - -func (x *UploadCacheTaskRequest) GetUploadCacheTaskStartedRequest() *UploadCacheTaskStartedRequest { - if x, ok := x.GetRequest().(*UploadCacheTaskRequest_UploadCacheTaskStartedRequest); ok { - return x.UploadCacheTaskStartedRequest - } - return nil -} - -func (x *UploadCacheTaskRequest) GetUploadCacheTaskFinishedRequest() *UploadCacheTaskFinishedRequest { - if x, ok := x.GetRequest().(*UploadCacheTaskRequest_UploadCacheTaskFinishedRequest); ok { - return x.UploadCacheTaskFinishedRequest - } - return nil -} - -func (x *UploadCacheTaskRequest) GetUploadCacheTaskFailedRequest() *UploadCacheTaskFailedRequest { - if x, ok := x.GetRequest().(*UploadCacheTaskRequest_UploadCacheTaskFailedRequest); ok { - return x.UploadCacheTaskFailedRequest - } - return nil -} - -type isUploadCacheTaskRequest_Request interface { - isUploadCacheTaskRequest_Request() -} - -type UploadCacheTaskRequest_UploadCacheTaskStartedRequest struct { - UploadCacheTaskStartedRequest *UploadCacheTaskStartedRequest `protobuf:"bytes,4,opt,name=upload_cache_task_started_request,json=uploadCacheTaskStartedRequest,proto3,oneof"` -} - -type UploadCacheTaskRequest_UploadCacheTaskFinishedRequest struct { - UploadCacheTaskFinishedRequest *UploadCacheTaskFinishedRequest `protobuf:"bytes,5,opt,name=upload_cache_task_finished_request,json=uploadCacheTaskFinishedRequest,proto3,oneof"` -} - -type UploadCacheTaskRequest_UploadCacheTaskFailedRequest struct { - UploadCacheTaskFailedRequest *UploadCacheTaskFailedRequest `protobuf:"bytes,6,opt,name=upload_cache_task_failed_request,json=uploadCacheTaskFailedRequest,proto3,oneof"` -} - -func (*UploadCacheTaskRequest_UploadCacheTaskStartedRequest) isUploadCacheTaskRequest_Request() {} - -func (*UploadCacheTaskRequest_UploadCacheTaskFinishedRequest) isUploadCacheTaskRequest_Request() {} - -func (*UploadCacheTaskRequest_UploadCacheTaskFailedRequest) isUploadCacheTaskRequest_Request() {} - // StatCacheTaskRequest represents request of StatCacheTask. type StatCacheTaskRequest struct { state protoimpl.MessageState @@ -3042,7 +2946,7 @@ type StatCacheTaskRequest struct { func (x *StatCacheTaskRequest) Reset() { *x = StatCacheTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[45] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3055,7 +2959,7 @@ func (x *StatCacheTaskRequest) String() string { func (*StatCacheTaskRequest) ProtoMessage() {} func (x *StatCacheTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[45] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3068,7 +2972,7 @@ func (x *StatCacheTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StatCacheTaskRequest.ProtoReflect.Descriptor instead. func (*StatCacheTaskRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{45} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{44} } func (x *StatCacheTaskRequest) GetTaskId() string { @@ -3093,7 +2997,7 @@ type DeleteCacheTaskRequest struct { func (x *DeleteCacheTaskRequest) Reset() { *x = DeleteCacheTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[46] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3106,7 +3010,7 @@ func (x *DeleteCacheTaskRequest) String() string { func (*DeleteCacheTaskRequest) ProtoMessage() {} func (x *DeleteCacheTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[46] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3119,7 +3023,7 @@ func (x *DeleteCacheTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteCacheTaskRequest.ProtoReflect.Descriptor instead. func (*DeleteCacheTaskRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{46} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{45} } func (x *DeleteCacheTaskRequest) GetHostId() string { @@ -3609,151 +3513,138 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_rawDesc = []byte{ 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, - 0x72, 0x49, 0x64, 0x22, 0xe9, 0x02, 0x0a, 0x1d, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, + 0x72, 0x49, 0x64, 0x22, 0xcf, 0x03, 0x0a, 0x1d, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x18, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, - 0x52, 0x16, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x74, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, - 0x25, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, - 0x01, 0x0a, 0x22, 0x04, 0x08, 0x80, 0xf5, 0x24, 0x32, 0x02, 0x08, 0x3c, 0x52, 0x03, 0x74, 0x74, - 0x6c, 0x12, 0x38, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, - 0x74, 0x61, 0x67, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, - 0x20, 0x0a, 0x1e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x61, 0x0a, 0x1c, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x31, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, - 0x01, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf9, 0x03, 0x0a, 0x16, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x20, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, - 0x64, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 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, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, - 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x77, 0x0a, 0x21, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x1d, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7a, - 0x0a, 0x22, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1e, 0x75, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x74, 0x0a, 0x20, 0x75, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x00, 0x52, 0x1c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x42, 0x0e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x22, 0x38, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 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, 0x22, 0x5c, 0x0a, 0x16, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, - 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x32, 0xc6, 0x08, 0x0a, 0x09, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, - 0x63, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x50, 0x65, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, - 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, - 0x01, 0x12, 0x3a, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1d, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x12, 0x45, 0x0a, - 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x50, 0x65, 0x65, 0x72, 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, 0x3a, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x45, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1f, - 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 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, 0x49, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, - 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, - 0x6f, 0x73, 0x74, 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, 0x45, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, - 0x12, 0x1f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 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, 0x53, 0x0a, 0x0a, 0x53, 0x79, 0x6e, - 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x68, - 0x0a, 0x11, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, - 0x65, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, - 0x6e, 0x63, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x49, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, - 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, - 0x65, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x50, 0x65, 0x65, 0x72, 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, 0x4f, 0x0a, 0x0f, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x24, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x28, 0x01, 0x12, 0x49, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x4f, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x12, 0x24, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x69, 0x64, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x18, 0x70, + 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x16, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, + 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x74, + 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0c, + 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x69, 0x65, + 0x63, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, 0x22, 0x04, 0x08, 0x80, 0xf5, 0x24, 0x32, 0x02, + 0x08, 0x3c, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x38, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x61, 0x67, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x0a, 0x1e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x61, 0x0a, 0x1c, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x38, 0x0a, 0x14, 0x53, 0x74, + 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 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, 0x22, 0x5c, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, + 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, + 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, + 0x49, 0x64, 0x32, 0x90, 0x0a, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, + 0x12, 0x59, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x65, 0x72, + 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3a, 0x0a, 0x08, 0x53, + 0x74, 0x61, 0x74, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x32, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 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, 0x3a, + 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1d, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x45, 0x0a, 0x0a, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 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, 0x42, 0x2f, 0x5a, 0x2d, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x12, 0x49, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, + 0x74, 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 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, 0x45, 0x0a, 0x0a, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x48, 0x6f, 0x73, 0x74, 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, 0x53, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, + 0x73, 0x12, 0x1f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x68, 0x0a, 0x11, 0x41, 0x6e, 0x6e, 0x6f, + 0x75, 0x6e, 0x63, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x26, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, + 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, + 0x30, 0x01, 0x12, 0x49, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, + 0x65, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x4f, 0x0a, + 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, + 0x12, 0x24, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x65, 0x65, 0x72, 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, 0x5d, + 0x0a, 0x16, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 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, 0x5d, 0x0a, + 0x17, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x2c, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x5b, 0x0a, 0x15, + 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x46, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x2a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 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, 0x49, 0x0a, 0x0d, 0x53, 0x74, 0x61, + 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x22, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x4f, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x24, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, + 0x68, 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, 0x42, 0x2f, 0x5a, 0x2d, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3768,7 +3659,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP() []byte { return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescData } -var file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 47) +var file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 46) var file_pkg_apis_scheduler_v2_scheduler_proto_goTypes = []interface{}{ (*RegisterPeerRequest)(nil), // 0: scheduler.v2.RegisterPeerRequest (*DownloadPeerStartedRequest)(nil), // 1: scheduler.v2.DownloadPeerStartedRequest @@ -3814,27 +3705,26 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_goTypes = []interface{}{ (*UploadCacheTaskStartedRequest)(nil), // 41: scheduler.v2.UploadCacheTaskStartedRequest (*UploadCacheTaskFinishedRequest)(nil), // 42: scheduler.v2.UploadCacheTaskFinishedRequest (*UploadCacheTaskFailedRequest)(nil), // 43: scheduler.v2.UploadCacheTaskFailedRequest - (*UploadCacheTaskRequest)(nil), // 44: scheduler.v2.UploadCacheTaskRequest - (*StatCacheTaskRequest)(nil), // 45: scheduler.v2.StatCacheTaskRequest - (*DeleteCacheTaskRequest)(nil), // 46: scheduler.v2.DeleteCacheTaskRequest - (*v2.Download)(nil), // 47: common.v2.Download - (*v2.Peer)(nil), // 48: common.v2.Peer - (*v2.Piece)(nil), // 49: common.v2.Piece - (*v21.Backend)(nil), // 50: errordetails.v2.Backend - (*v2.Host)(nil), // 51: common.v2.Host - (*durationpb.Duration)(nil), // 52: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 53: google.protobuf.Timestamp - (*v2.CachePeer)(nil), // 54: common.v2.CachePeer - (*emptypb.Empty)(nil), // 55: google.protobuf.Empty - (*v2.Task)(nil), // 56: common.v2.Task - (*v2.CacheTask)(nil), // 57: common.v2.CacheTask + (*StatCacheTaskRequest)(nil), // 44: scheduler.v2.StatCacheTaskRequest + (*DeleteCacheTaskRequest)(nil), // 45: scheduler.v2.DeleteCacheTaskRequest + (*v2.Download)(nil), // 46: common.v2.Download + (*v2.Peer)(nil), // 47: common.v2.Peer + (*v2.Piece)(nil), // 48: common.v2.Piece + (*v21.Backend)(nil), // 49: errordetails.v2.Backend + (*v2.Host)(nil), // 50: common.v2.Host + (*durationpb.Duration)(nil), // 51: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 52: google.protobuf.Timestamp + (*v2.CachePeer)(nil), // 53: common.v2.CachePeer + (*emptypb.Empty)(nil), // 54: google.protobuf.Empty + (*v2.Task)(nil), // 55: common.v2.Task + (*v2.CacheTask)(nil), // 56: common.v2.CacheTask } var file_pkg_apis_scheduler_v2_scheduler_proto_depIdxs = []int32{ - 47, // 0: scheduler.v2.RegisterPeerRequest.download:type_name -> common.v2.Download - 48, // 1: scheduler.v2.ReschedulePeerRequest.candidate_parents:type_name -> common.v2.Peer - 49, // 2: scheduler.v2.DownloadPieceFinishedRequest.piece:type_name -> common.v2.Piece - 49, // 3: scheduler.v2.DownloadPieceBackToSourceFinishedRequest.piece:type_name -> common.v2.Piece - 50, // 4: scheduler.v2.DownloadPieceBackToSourceFailedRequest.backend:type_name -> errordetails.v2.Backend + 46, // 0: scheduler.v2.RegisterPeerRequest.download:type_name -> common.v2.Download + 47, // 1: scheduler.v2.ReschedulePeerRequest.candidate_parents:type_name -> common.v2.Peer + 48, // 2: scheduler.v2.DownloadPieceFinishedRequest.piece:type_name -> common.v2.Piece + 48, // 3: scheduler.v2.DownloadPieceBackToSourceFinishedRequest.piece:type_name -> common.v2.Piece + 49, // 4: scheduler.v2.DownloadPieceBackToSourceFailedRequest.backend:type_name -> errordetails.v2.Backend 0, // 5: scheduler.v2.AnnouncePeerRequest.register_peer_request:type_name -> scheduler.v2.RegisterPeerRequest 1, // 6: scheduler.v2.AnnouncePeerRequest.download_peer_started_request:type_name -> scheduler.v2.DownloadPeerStartedRequest 2, // 7: scheduler.v2.AnnouncePeerRequest.download_peer_back_to_source_started_request:type_name -> scheduler.v2.DownloadPeerBackToSourceStartedRequest @@ -3847,25 +3737,25 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_depIdxs = []int32{ 9, // 14: scheduler.v2.AnnouncePeerRequest.download_piece_back_to_source_finished_request:type_name -> scheduler.v2.DownloadPieceBackToSourceFinishedRequest 10, // 15: scheduler.v2.AnnouncePeerRequest.download_piece_failed_request:type_name -> scheduler.v2.DownloadPieceFailedRequest 11, // 16: scheduler.v2.AnnouncePeerRequest.download_piece_back_to_source_failed_request:type_name -> scheduler.v2.DownloadPieceBackToSourceFailedRequest - 48, // 17: scheduler.v2.NormalTaskResponse.candidate_parents:type_name -> common.v2.Peer + 47, // 17: scheduler.v2.NormalTaskResponse.candidate_parents:type_name -> common.v2.Peer 13, // 18: scheduler.v2.AnnouncePeerResponse.empty_task_response:type_name -> scheduler.v2.EmptyTaskResponse 14, // 19: scheduler.v2.AnnouncePeerResponse.normal_task_response:type_name -> scheduler.v2.NormalTaskResponse 15, // 20: scheduler.v2.AnnouncePeerResponse.need_back_to_source_response:type_name -> scheduler.v2.NeedBackToSourceResponse - 51, // 21: scheduler.v2.AnnounceHostRequest.host:type_name -> common.v2.Host - 52, // 22: scheduler.v2.AnnounceHostRequest.interval:type_name -> google.protobuf.Duration - 51, // 23: scheduler.v2.Probe.host:type_name -> common.v2.Host - 52, // 24: scheduler.v2.Probe.rtt:type_name -> google.protobuf.Duration - 53, // 25: scheduler.v2.Probe.created_at:type_name -> google.protobuf.Timestamp + 50, // 21: scheduler.v2.AnnounceHostRequest.host:type_name -> common.v2.Host + 51, // 22: scheduler.v2.AnnounceHostRequest.interval:type_name -> google.protobuf.Duration + 50, // 23: scheduler.v2.Probe.host:type_name -> common.v2.Host + 51, // 24: scheduler.v2.Probe.rtt:type_name -> google.protobuf.Duration + 52, // 25: scheduler.v2.Probe.created_at:type_name -> google.protobuf.Timestamp 24, // 26: scheduler.v2.ProbeFinishedRequest.probes:type_name -> scheduler.v2.Probe - 51, // 27: scheduler.v2.FailedProbe.host:type_name -> common.v2.Host + 50, // 27: scheduler.v2.FailedProbe.host:type_name -> common.v2.Host 26, // 28: scheduler.v2.ProbeFailedRequest.probes:type_name -> scheduler.v2.FailedProbe - 51, // 29: scheduler.v2.SyncProbesRequest.host:type_name -> common.v2.Host + 50, // 29: scheduler.v2.SyncProbesRequest.host:type_name -> common.v2.Host 23, // 30: scheduler.v2.SyncProbesRequest.probe_started_request:type_name -> scheduler.v2.ProbeStartedRequest 25, // 31: scheduler.v2.SyncProbesRequest.probe_finished_request:type_name -> scheduler.v2.ProbeFinishedRequest 27, // 32: scheduler.v2.SyncProbesRequest.probe_failed_request:type_name -> scheduler.v2.ProbeFailedRequest - 51, // 33: scheduler.v2.SyncProbesResponse.hosts:type_name -> common.v2.Host - 52, // 34: scheduler.v2.RegisterCachePeerRequest.timeout:type_name -> google.protobuf.Duration - 54, // 35: scheduler.v2.RescheduleCachePeerRequest.candidate_parents:type_name -> common.v2.CachePeer + 50, // 33: scheduler.v2.SyncProbesResponse.hosts:type_name -> common.v2.Host + 51, // 34: scheduler.v2.RegisterCachePeerRequest.timeout:type_name -> google.protobuf.Duration + 53, // 35: scheduler.v2.RescheduleCachePeerRequest.candidate_parents:type_name -> common.v2.CachePeer 30, // 36: scheduler.v2.AnnounceCachePeerRequest.register_cache_peer_request:type_name -> scheduler.v2.RegisterCachePeerRequest 31, // 37: scheduler.v2.AnnounceCachePeerRequest.download_cache_peer_started_request:type_name -> scheduler.v2.DownloadCachePeerStartedRequest 32, // 38: scheduler.v2.AnnounceCachePeerRequest.reschedule_cache_peer_request:type_name -> scheduler.v2.RescheduleCachePeerRequest @@ -3873,47 +3763,48 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_depIdxs = []int32{ 34, // 40: scheduler.v2.AnnounceCachePeerRequest.download_cache_peer_failed_request:type_name -> scheduler.v2.DownloadCachePeerFailedRequest 8, // 41: scheduler.v2.AnnounceCachePeerRequest.download_piece_finished_request:type_name -> scheduler.v2.DownloadPieceFinishedRequest 10, // 42: scheduler.v2.AnnounceCachePeerRequest.download_piece_failed_request:type_name -> scheduler.v2.DownloadPieceFailedRequest - 54, // 43: scheduler.v2.NormalCacheTaskResponse.candidate_parents:type_name -> common.v2.CachePeer + 53, // 43: scheduler.v2.NormalCacheTaskResponse.candidate_parents:type_name -> common.v2.CachePeer 36, // 44: scheduler.v2.AnnounceCachePeerResponse.empty_task_response:type_name -> scheduler.v2.EmptyCacheTaskResponse 37, // 45: scheduler.v2.AnnounceCachePeerResponse.normal_task_response:type_name -> scheduler.v2.NormalCacheTaskResponse - 52, // 46: scheduler.v2.UploadCacheTaskStartedRequest.ttl:type_name -> google.protobuf.Duration - 52, // 47: scheduler.v2.UploadCacheTaskStartedRequest.timeout:type_name -> google.protobuf.Duration - 41, // 48: scheduler.v2.UploadCacheTaskRequest.upload_cache_task_started_request:type_name -> scheduler.v2.UploadCacheTaskStartedRequest - 42, // 49: scheduler.v2.UploadCacheTaskRequest.upload_cache_task_finished_request:type_name -> scheduler.v2.UploadCacheTaskFinishedRequest - 43, // 50: scheduler.v2.UploadCacheTaskRequest.upload_cache_task_failed_request:type_name -> scheduler.v2.UploadCacheTaskFailedRequest - 12, // 51: scheduler.v2.Scheduler.AnnouncePeer:input_type -> scheduler.v2.AnnouncePeerRequest - 17, // 52: scheduler.v2.Scheduler.StatPeer:input_type -> scheduler.v2.StatPeerRequest - 18, // 53: scheduler.v2.Scheduler.DeletePeer:input_type -> scheduler.v2.DeletePeerRequest - 19, // 54: scheduler.v2.Scheduler.StatTask:input_type -> scheduler.v2.StatTaskRequest - 20, // 55: scheduler.v2.Scheduler.DeleteTask:input_type -> scheduler.v2.DeleteTaskRequest - 21, // 56: scheduler.v2.Scheduler.AnnounceHost:input_type -> scheduler.v2.AnnounceHostRequest - 22, // 57: scheduler.v2.Scheduler.DeleteHost:input_type -> scheduler.v2.DeleteHostRequest - 28, // 58: scheduler.v2.Scheduler.SyncProbes:input_type -> scheduler.v2.SyncProbesRequest - 35, // 59: scheduler.v2.Scheduler.AnnounceCachePeer:input_type -> scheduler.v2.AnnounceCachePeerRequest - 39, // 60: scheduler.v2.Scheduler.StatCachePeer:input_type -> scheduler.v2.StatCachePeerRequest - 40, // 61: scheduler.v2.Scheduler.DeleteCachePeer:input_type -> scheduler.v2.DeleteCachePeerRequest - 44, // 62: scheduler.v2.Scheduler.UploadCacheTask:input_type -> scheduler.v2.UploadCacheTaskRequest - 45, // 63: scheduler.v2.Scheduler.StatCacheTask:input_type -> scheduler.v2.StatCacheTaskRequest - 46, // 64: scheduler.v2.Scheduler.DeleteCacheTask:input_type -> scheduler.v2.DeleteCacheTaskRequest - 16, // 65: scheduler.v2.Scheduler.AnnouncePeer:output_type -> scheduler.v2.AnnouncePeerResponse - 48, // 66: scheduler.v2.Scheduler.StatPeer:output_type -> common.v2.Peer - 55, // 67: scheduler.v2.Scheduler.DeletePeer:output_type -> google.protobuf.Empty - 56, // 68: scheduler.v2.Scheduler.StatTask:output_type -> common.v2.Task - 55, // 69: scheduler.v2.Scheduler.DeleteTask:output_type -> google.protobuf.Empty - 55, // 70: scheduler.v2.Scheduler.AnnounceHost:output_type -> google.protobuf.Empty - 55, // 71: scheduler.v2.Scheduler.DeleteHost:output_type -> google.protobuf.Empty - 29, // 72: scheduler.v2.Scheduler.SyncProbes:output_type -> scheduler.v2.SyncProbesResponse - 38, // 73: scheduler.v2.Scheduler.AnnounceCachePeer:output_type -> scheduler.v2.AnnounceCachePeerResponse - 54, // 74: scheduler.v2.Scheduler.StatCachePeer:output_type -> common.v2.CachePeer - 55, // 75: scheduler.v2.Scheduler.DeleteCachePeer:output_type -> google.protobuf.Empty - 57, // 76: scheduler.v2.Scheduler.UploadCacheTask:output_type -> common.v2.CacheTask - 57, // 77: scheduler.v2.Scheduler.StatCacheTask:output_type -> common.v2.CacheTask - 55, // 78: scheduler.v2.Scheduler.DeleteCacheTask:output_type -> google.protobuf.Empty - 65, // [65:79] is the sub-list for method output_type - 51, // [51:65] is the sub-list for method input_type - 51, // [51:51] is the sub-list for extension type_name - 51, // [51:51] is the sub-list for extension extendee - 0, // [0:51] is the sub-list for field type_name + 51, // 46: scheduler.v2.UploadCacheTaskStartedRequest.ttl:type_name -> google.protobuf.Duration + 51, // 47: scheduler.v2.UploadCacheTaskStartedRequest.timeout:type_name -> google.protobuf.Duration + 12, // 48: scheduler.v2.Scheduler.AnnouncePeer:input_type -> scheduler.v2.AnnouncePeerRequest + 17, // 49: scheduler.v2.Scheduler.StatPeer:input_type -> scheduler.v2.StatPeerRequest + 18, // 50: scheduler.v2.Scheduler.DeletePeer:input_type -> scheduler.v2.DeletePeerRequest + 19, // 51: scheduler.v2.Scheduler.StatTask:input_type -> scheduler.v2.StatTaskRequest + 20, // 52: scheduler.v2.Scheduler.DeleteTask:input_type -> scheduler.v2.DeleteTaskRequest + 21, // 53: scheduler.v2.Scheduler.AnnounceHost:input_type -> scheduler.v2.AnnounceHostRequest + 22, // 54: scheduler.v2.Scheduler.DeleteHost:input_type -> scheduler.v2.DeleteHostRequest + 28, // 55: scheduler.v2.Scheduler.SyncProbes:input_type -> scheduler.v2.SyncProbesRequest + 35, // 56: scheduler.v2.Scheduler.AnnounceCachePeer:input_type -> scheduler.v2.AnnounceCachePeerRequest + 39, // 57: scheduler.v2.Scheduler.StatCachePeer:input_type -> scheduler.v2.StatCachePeerRequest + 40, // 58: scheduler.v2.Scheduler.DeleteCachePeer:input_type -> scheduler.v2.DeleteCachePeerRequest + 41, // 59: scheduler.v2.Scheduler.UploadCacheTaskStarted:input_type -> scheduler.v2.UploadCacheTaskStartedRequest + 42, // 60: scheduler.v2.Scheduler.UploadCacheTaskFinished:input_type -> scheduler.v2.UploadCacheTaskFinishedRequest + 43, // 61: scheduler.v2.Scheduler.UploadCacheTaskFailed:input_type -> scheduler.v2.UploadCacheTaskFailedRequest + 44, // 62: scheduler.v2.Scheduler.StatCacheTask:input_type -> scheduler.v2.StatCacheTaskRequest + 45, // 63: scheduler.v2.Scheduler.DeleteCacheTask:input_type -> scheduler.v2.DeleteCacheTaskRequest + 16, // 64: scheduler.v2.Scheduler.AnnouncePeer:output_type -> scheduler.v2.AnnouncePeerResponse + 47, // 65: scheduler.v2.Scheduler.StatPeer:output_type -> common.v2.Peer + 54, // 66: scheduler.v2.Scheduler.DeletePeer:output_type -> google.protobuf.Empty + 55, // 67: scheduler.v2.Scheduler.StatTask:output_type -> common.v2.Task + 54, // 68: scheduler.v2.Scheduler.DeleteTask:output_type -> google.protobuf.Empty + 54, // 69: scheduler.v2.Scheduler.AnnounceHost:output_type -> google.protobuf.Empty + 54, // 70: scheduler.v2.Scheduler.DeleteHost:output_type -> google.protobuf.Empty + 29, // 71: scheduler.v2.Scheduler.SyncProbes:output_type -> scheduler.v2.SyncProbesResponse + 38, // 72: scheduler.v2.Scheduler.AnnounceCachePeer:output_type -> scheduler.v2.AnnounceCachePeerResponse + 53, // 73: scheduler.v2.Scheduler.StatCachePeer:output_type -> common.v2.CachePeer + 54, // 74: scheduler.v2.Scheduler.DeleteCachePeer:output_type -> google.protobuf.Empty + 54, // 75: scheduler.v2.Scheduler.UploadCacheTaskStarted:output_type -> google.protobuf.Empty + 56, // 76: scheduler.v2.Scheduler.UploadCacheTaskFinished:output_type -> common.v2.CacheTask + 54, // 77: scheduler.v2.Scheduler.UploadCacheTaskFailed:output_type -> google.protobuf.Empty + 56, // 78: scheduler.v2.Scheduler.StatCacheTask:output_type -> common.v2.CacheTask + 54, // 79: scheduler.v2.Scheduler.DeleteCacheTask:output_type -> google.protobuf.Empty + 64, // [64:80] is the sub-list for method output_type + 48, // [48:64] is the sub-list for method input_type + 48, // [48:48] is the sub-list for extension type_name + 48, // [48:48] is the sub-list for extension extendee + 0, // [0:48] is the sub-list for field type_name } func init() { file_pkg_apis_scheduler_v2_scheduler_proto_init() } @@ -4451,18 +4342,6 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { } } file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadCacheTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatCacheTaskRequest); i { case 0: return &v.state @@ -4474,7 +4353,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { return nil } } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteCacheTaskRequest); i { case 0: return &v.state @@ -4540,18 +4419,13 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { } file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[41].OneofWrappers = []interface{}{} file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[43].OneofWrappers = []interface{}{} - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[44].OneofWrappers = []interface{}{ - (*UploadCacheTaskRequest_UploadCacheTaskStartedRequest)(nil), - (*UploadCacheTaskRequest_UploadCacheTaskFinishedRequest)(nil), - (*UploadCacheTaskRequest_UploadCacheTaskFailedRequest)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_scheduler_v2_scheduler_proto_rawDesc, NumEnums: 0, - NumMessages: 47, + NumMessages: 46, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apis/scheduler/v2/scheduler.pb.validate.go b/pkg/apis/scheduler/v2/scheduler.pb.validate.go index 8910e49..cae3943 100644 --- a/pkg/apis/scheduler/v2/scheduler.pb.validate.go +++ b/pkg/apis/scheduler/v2/scheduler.pb.validate.go @@ -6668,6 +6668,39 @@ func (m *UploadCacheTaskStartedRequest) validate(all bool) error { var errors []error + if utf8.RuneCountInString(m.GetHostId()) < 1 { + err := UploadCacheTaskStartedRequestValidationError{ + field: "HostId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetTaskId()) < 1 { + err := UploadCacheTaskStartedRequestValidationError{ + field: "TaskId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetPeerId()) < 1 { + err := UploadCacheTaskStartedRequestValidationError{ + field: "PeerId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + if m.GetPersistentReplicaCount() < 1 { err := UploadCacheTaskStartedRequestValidationError{ field: "PersistentReplicaCount", @@ -7068,283 +7101,6 @@ var _ interface { ErrorName() string } = UploadCacheTaskFailedRequestValidationError{} -// Validate checks the field values on UploadCacheTaskRequest 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 *UploadCacheTaskRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UploadCacheTaskRequest 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 -// UploadCacheTaskRequestMultiError, or nil if none found. -func (m *UploadCacheTaskRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *UploadCacheTaskRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetHostId()) < 1 { - err := UploadCacheTaskRequestValidationError{ - field: "HostId", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetTaskId()) < 1 { - err := UploadCacheTaskRequestValidationError{ - field: "TaskId", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetPeerId()) < 1 { - err := UploadCacheTaskRequestValidationError{ - field: "PeerId", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - oneofRequestPresent := false - switch v := m.Request.(type) { - case *UploadCacheTaskRequest_UploadCacheTaskStartedRequest: - if v == nil { - err := UploadCacheTaskRequestValidationError{ - field: "Request", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRequestPresent = true - - if all { - switch v := interface{}(m.GetUploadCacheTaskStartedRequest()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UploadCacheTaskRequestValidationError{ - field: "UploadCacheTaskStartedRequest", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UploadCacheTaskRequestValidationError{ - field: "UploadCacheTaskStartedRequest", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUploadCacheTaskStartedRequest()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UploadCacheTaskRequestValidationError{ - field: "UploadCacheTaskStartedRequest", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *UploadCacheTaskRequest_UploadCacheTaskFinishedRequest: - if v == nil { - err := UploadCacheTaskRequestValidationError{ - field: "Request", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRequestPresent = true - - if all { - switch v := interface{}(m.GetUploadCacheTaskFinishedRequest()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UploadCacheTaskRequestValidationError{ - field: "UploadCacheTaskFinishedRequest", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UploadCacheTaskRequestValidationError{ - field: "UploadCacheTaskFinishedRequest", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUploadCacheTaskFinishedRequest()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UploadCacheTaskRequestValidationError{ - field: "UploadCacheTaskFinishedRequest", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *UploadCacheTaskRequest_UploadCacheTaskFailedRequest: - if v == nil { - err := UploadCacheTaskRequestValidationError{ - field: "Request", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRequestPresent = true - - if all { - switch v := interface{}(m.GetUploadCacheTaskFailedRequest()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UploadCacheTaskRequestValidationError{ - field: "UploadCacheTaskFailedRequest", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UploadCacheTaskRequestValidationError{ - field: "UploadCacheTaskFailedRequest", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUploadCacheTaskFailedRequest()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UploadCacheTaskRequestValidationError{ - field: "UploadCacheTaskFailedRequest", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofRequestPresent { - err := UploadCacheTaskRequestValidationError{ - field: "Request", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return UploadCacheTaskRequestMultiError(errors) - } - - return nil -} - -// UploadCacheTaskRequestMultiError is an error wrapping multiple validation -// errors returned by UploadCacheTaskRequest.ValidateAll() if the designated -// constraints aren't met. -type UploadCacheTaskRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UploadCacheTaskRequestMultiError) 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 UploadCacheTaskRequestMultiError) AllErrors() []error { return m } - -// UploadCacheTaskRequestValidationError is the validation error returned by -// UploadCacheTaskRequest.Validate if the designated constraints aren't met. -type UploadCacheTaskRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UploadCacheTaskRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UploadCacheTaskRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UploadCacheTaskRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UploadCacheTaskRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UploadCacheTaskRequestValidationError) ErrorName() string { - return "UploadCacheTaskRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e UploadCacheTaskRequestValidationError) 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 %sUploadCacheTaskRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UploadCacheTaskRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UploadCacheTaskRequestValidationError{} - // Validate checks the field values on StatCacheTaskRequest 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/v2/scheduler.proto b/pkg/apis/scheduler/v2/scheduler.proto index 7fa602f..87b6393 100644 --- a/pkg/apis/scheduler/v2/scheduler.proto +++ b/pkg/apis/scheduler/v2/scheduler.proto @@ -375,47 +375,35 @@ message DeleteCachePeerRequest { string peer_id = 3 [(validate.rules).string.min_len = 1]; } -// UploadCacheTaskStartedRequest represents upload cache task started request of UploadCacheTaskRequest. +// UploadCacheTaskStartedRequest represents upload cache task started request of UploadCacheTaskStartedRequest. message UploadCacheTaskStartedRequest { - // Replica count of the persistent cache task. - uint64 persistent_replica_count = 1 [(validate.rules).uint64.gte = 1]; - // Tag is used to distinguish different cache tasks. - optional string tag = 2; - // Application of task. - optional string application = 3; - // Task piece length. - uint64 piece_length = 4 [(validate.rules).uint64.gte = 1]; - // TTL of the cache task. - google.protobuf.Duration ttl = 5 [(validate.rules).duration = {gte:{seconds: 60}, lte:{seconds: 604800}}]; - // Upload timeout. - optional google.protobuf.Duration timeout = 6; -} - -// UploadCacheTaskFinishedRequest represents upload cache task finished request of UploadCacheTaskRequest. -message UploadCacheTaskFinishedRequest {} - -// UploadCacheTaskFailedRequest represents upload cache task failed request of UploadCacheTaskRequest. -message UploadCacheTaskFailedRequest { - // The description of the upload failed. - optional string description = 1 [(validate.rules).string = {min_len: 1, ignore_empty: true}]; -} - -// UploadCacheTaskRequest represents request of UploadCacheTask. -message UploadCacheTaskRequest { // Host id. string host_id = 1 [(validate.rules).string.min_len = 1]; // Task id. string task_id = 2 [(validate.rules).string.min_len = 1]; // Peer id. string peer_id = 3 [(validate.rules).string.min_len = 1]; + // Replica count of the persistent cache task. + uint64 persistent_replica_count = 4 [(validate.rules).uint64.gte = 1]; + // Tag is used to distinguish different cache tasks. + optional string tag = 5; + // Application of task. + optional string application = 6; + // Task piece length. + uint64 piece_length = 7 [(validate.rules).uint64.gte = 1]; + // TTL of the cache task. + google.protobuf.Duration ttl = 8 [(validate.rules).duration = {gte:{seconds: 60}, lte:{seconds: 604800}}]; + // Upload timeout. + optional google.protobuf.Duration timeout = 9; +} - oneof request { - option (validate.required) = true; +// UploadCacheTaskFinishedRequest represents upload cache task finished request of UploadCacheTaskFinishedRequest. +message UploadCacheTaskFinishedRequest {} - UploadCacheTaskStartedRequest upload_cache_task_started_request = 4; - UploadCacheTaskFinishedRequest upload_cache_task_finished_request = 5; - UploadCacheTaskFailedRequest upload_cache_task_failed_request = 6; - } +// UploadCacheTaskFailedRequest represents upload cache task failed request of UploadCacheTaskFailedRequest. +message UploadCacheTaskFailedRequest { + // The description of the upload failed. + optional string description = 1 [(validate.rules).string = {min_len: 1, ignore_empty: true}]; } // StatCacheTaskRequest represents request of StatCacheTask. @@ -467,8 +455,14 @@ service Scheduler { // DeleteCachePeer releases cache peer in scheduler. rpc DeleteCachePeer(DeleteCachePeerRequest)returns(google.protobuf.Empty); - // UploadCacheTask uploads cache task to scheduler. - rpc UploadCacheTask(stream UploadCacheTaskRequest)returns(common.v2.CacheTask); + // UploadCacheTaskStarted uploads cache task started to scheduler. + rpc UploadCacheTaskStarted(UploadCacheTaskStartedRequest)returns(google.protobuf.Empty); + + // UploadCacheTaskFinished uploads cache task finished to scheduler. + rpc UploadCacheTaskFinished(UploadCacheTaskFinishedRequest)returns(common.v2.CacheTask); + + // UploadCacheTaskFailed uploads cache task failed to scheduler. + rpc UploadCacheTaskFailed(UploadCacheTaskFailedRequest)returns(google.protobuf.Empty); // Checks information of cache task. rpc StatCacheTask(StatCacheTaskRequest)returns(common.v2.CacheTask); diff --git a/pkg/apis/scheduler/v2/scheduler_grpc.pb.go b/pkg/apis/scheduler/v2/scheduler_grpc.pb.go index 2ee7c2f..76247cb 100644 --- a/pkg/apis/scheduler/v2/scheduler_grpc.pb.go +++ b/pkg/apis/scheduler/v2/scheduler_grpc.pb.go @@ -46,8 +46,12 @@ type SchedulerClient interface { StatCachePeer(ctx context.Context, in *StatCachePeerRequest, opts ...grpc.CallOption) (*v2.CachePeer, error) // DeleteCachePeer releases cache peer in scheduler. DeleteCachePeer(ctx context.Context, in *DeleteCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // UploadCacheTask uploads cache task to scheduler. - UploadCacheTask(ctx context.Context, opts ...grpc.CallOption) (Scheduler_UploadCacheTaskClient, error) + // UploadCacheTaskStarted uploads cache task started to scheduler. + UploadCacheTaskStarted(ctx context.Context, in *UploadCacheTaskStartedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // UploadCacheTaskFinished uploads cache task finished to scheduler. + UploadCacheTaskFinished(ctx context.Context, in *UploadCacheTaskFinishedRequest, opts ...grpc.CallOption) (*v2.CacheTask, error) + // UploadCacheTaskFailed uploads cache task failed to scheduler. + UploadCacheTaskFailed(ctx context.Context, in *UploadCacheTaskFailedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Checks information of cache task. StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error) // DeleteCacheTask releases cache task in scheduler. @@ -227,38 +231,31 @@ func (c *schedulerClient) DeleteCachePeer(ctx context.Context, in *DeleteCachePe return out, nil } -func (c *schedulerClient) UploadCacheTask(ctx context.Context, opts ...grpc.CallOption) (Scheduler_UploadCacheTaskClient, error) { - stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[3], "/scheduler.v2.Scheduler/UploadCacheTask", opts...) +func (c *schedulerClient) UploadCacheTaskStarted(ctx context.Context, in *UploadCacheTaskStartedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/UploadCacheTaskStarted", in, out, opts...) if err != nil { return nil, err } - x := &schedulerUploadCacheTaskClient{stream} - return x, nil + return out, nil } -type Scheduler_UploadCacheTaskClient interface { - Send(*UploadCacheTaskRequest) error - CloseAndRecv() (*v2.CacheTask, error) - grpc.ClientStream -} - -type schedulerUploadCacheTaskClient struct { - grpc.ClientStream -} - -func (x *schedulerUploadCacheTaskClient) Send(m *UploadCacheTaskRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *schedulerUploadCacheTaskClient) CloseAndRecv() (*v2.CacheTask, error) { - if err := x.ClientStream.CloseSend(); err != nil { +func (c *schedulerClient) UploadCacheTaskFinished(ctx context.Context, in *UploadCacheTaskFinishedRequest, opts ...grpc.CallOption) (*v2.CacheTask, error) { + out := new(v2.CacheTask) + err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/UploadCacheTaskFinished", in, out, opts...) + if err != nil { return nil, err } - m := new(v2.CacheTask) - if err := x.ClientStream.RecvMsg(m); err != nil { + return out, nil +} + +func (c *schedulerClient) UploadCacheTaskFailed(ctx context.Context, in *UploadCacheTaskFailedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/UploadCacheTaskFailed", in, out, opts...) + if err != nil { return nil, err } - return m, nil + return out, nil } func (c *schedulerClient) StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error) { @@ -305,8 +302,12 @@ type SchedulerServer interface { StatCachePeer(context.Context, *StatCachePeerRequest) (*v2.CachePeer, error) // DeleteCachePeer releases cache peer in scheduler. DeleteCachePeer(context.Context, *DeleteCachePeerRequest) (*emptypb.Empty, error) - // UploadCacheTask uploads cache task to scheduler. - UploadCacheTask(Scheduler_UploadCacheTaskServer) error + // UploadCacheTaskStarted uploads cache task started to scheduler. + UploadCacheTaskStarted(context.Context, *UploadCacheTaskStartedRequest) (*emptypb.Empty, error) + // UploadCacheTaskFinished uploads cache task finished to scheduler. + UploadCacheTaskFinished(context.Context, *UploadCacheTaskFinishedRequest) (*v2.CacheTask, error) + // UploadCacheTaskFailed uploads cache task failed to scheduler. + UploadCacheTaskFailed(context.Context, *UploadCacheTaskFailedRequest) (*emptypb.Empty, error) // Checks information of cache task. StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error) // DeleteCacheTask releases cache task in scheduler. @@ -350,8 +351,14 @@ func (UnimplementedSchedulerServer) StatCachePeer(context.Context, *StatCachePee func (UnimplementedSchedulerServer) DeleteCachePeer(context.Context, *DeleteCachePeerRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteCachePeer not implemented") } -func (UnimplementedSchedulerServer) UploadCacheTask(Scheduler_UploadCacheTaskServer) error { - return status.Errorf(codes.Unimplemented, "method UploadCacheTask not implemented") +func (UnimplementedSchedulerServer) UploadCacheTaskStarted(context.Context, *UploadCacheTaskStartedRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UploadCacheTaskStarted not implemented") +} +func (UnimplementedSchedulerServer) UploadCacheTaskFinished(context.Context, *UploadCacheTaskFinishedRequest) (*v2.CacheTask, error) { + return nil, status.Errorf(codes.Unimplemented, "method UploadCacheTaskFinished not implemented") +} +func (UnimplementedSchedulerServer) UploadCacheTaskFailed(context.Context, *UploadCacheTaskFailedRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UploadCacheTaskFailed not implemented") } func (UnimplementedSchedulerServer) StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error) { return nil, status.Errorf(codes.Unimplemented, "method StatCacheTask not implemented") @@ -593,30 +600,58 @@ func _Scheduler_DeleteCachePeer_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _Scheduler_UploadCacheTask_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(SchedulerServer).UploadCacheTask(&schedulerUploadCacheTaskServer{stream}) -} - -type Scheduler_UploadCacheTaskServer interface { - SendAndClose(*v2.CacheTask) error - Recv() (*UploadCacheTaskRequest, error) - grpc.ServerStream -} - -type schedulerUploadCacheTaskServer struct { - grpc.ServerStream -} - -func (x *schedulerUploadCacheTaskServer) SendAndClose(m *v2.CacheTask) error { - return x.ServerStream.SendMsg(m) -} - -func (x *schedulerUploadCacheTaskServer) Recv() (*UploadCacheTaskRequest, error) { - m := new(UploadCacheTaskRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { +func _Scheduler_UploadCacheTaskStarted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UploadCacheTaskStartedRequest) + if err := dec(in); err != nil { return nil, err } - return m, nil + if interceptor == nil { + return srv.(SchedulerServer).UploadCacheTaskStarted(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/scheduler.v2.Scheduler/UploadCacheTaskStarted", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SchedulerServer).UploadCacheTaskStarted(ctx, req.(*UploadCacheTaskStartedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Scheduler_UploadCacheTaskFinished_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UploadCacheTaskFinishedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SchedulerServer).UploadCacheTaskFinished(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/scheduler.v2.Scheduler/UploadCacheTaskFinished", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SchedulerServer).UploadCacheTaskFinished(ctx, req.(*UploadCacheTaskFinishedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Scheduler_UploadCacheTaskFailed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UploadCacheTaskFailedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SchedulerServer).UploadCacheTaskFailed(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/scheduler.v2.Scheduler/UploadCacheTaskFailed", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SchedulerServer).UploadCacheTaskFailed(ctx, req.(*UploadCacheTaskFailedRequest)) + } + return interceptor(ctx, in, info, handler) } func _Scheduler_StatCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -694,6 +729,18 @@ var Scheduler_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeleteCachePeer", Handler: _Scheduler_DeleteCachePeer_Handler, }, + { + MethodName: "UploadCacheTaskStarted", + Handler: _Scheduler_UploadCacheTaskStarted_Handler, + }, + { + MethodName: "UploadCacheTaskFinished", + Handler: _Scheduler_UploadCacheTaskFinished_Handler, + }, + { + MethodName: "UploadCacheTaskFailed", + Handler: _Scheduler_UploadCacheTaskFailed_Handler, + }, { MethodName: "StatCacheTask", Handler: _Scheduler_StatCacheTask_Handler, @@ -722,11 +769,6 @@ var Scheduler_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, ClientStreams: true, }, - { - StreamName: "UploadCacheTask", - Handler: _Scheduler_UploadCacheTask_Handler, - ClientStreams: true, - }, }, Metadata: "pkg/apis/scheduler/v2/scheduler.proto", } diff --git a/proto/scheduler.proto b/proto/scheduler.proto index 5151919..8d9c9a7 100644 --- a/proto/scheduler.proto +++ b/proto/scheduler.proto @@ -359,45 +359,35 @@ message DeleteCachePeerRequest { string peer_id = 3; } -// UploadCacheTaskStartedRequest represents upload cache task started request of UploadCacheTaskRequest. +// UploadCacheTaskStartedRequest represents upload cache task started request of UploadCacheTaskStarted. message UploadCacheTaskStartedRequest { - // Replica count of the persistent cache task. - uint64 persistent_replica_count = 1; - // Tag is used to distinguish different cache tasks. - optional string tag = 2; - // Application of task. - optional string application = 3; - // Task piece length. - uint64 piece_length = 4; - // TTL of the cache task. - google.protobuf.Duration ttl = 5; - // Upload timeout. - optional google.protobuf.Duration timeout = 6; -} - -// UploadCacheTaskFinishedRequest represents upload cache task finished request of UploadCacheTaskRequest. -message UploadCacheTaskFinishedRequest {} - -// UploadCacheTaskFailedRequest represents upload cache task failed request of UploadCacheTaskRequest. -message UploadCacheTaskFailedRequest { - // The description of the upload failed. - optional string description = 1; -} - -// UploadCacheTaskRequest represents request of UploadCacheTask. -message UploadCacheTaskRequest { // Host id. string host_id = 1; // Task id. string task_id = 2; // Peer id. string peer_id = 3; + // Replica count of the persistent cache task. + uint64 persistent_replica_count = 4; + // Tag is used to distinguish different cache tasks. + optional string tag = 5; + // Application of task. + optional string application = 6; + // Task piece length. + uint64 piece_length = 7; + // TTL of the cache task. + google.protobuf.Duration ttl = 8; + // Upload timeout. + optional google.protobuf.Duration timeout = 9; +} - oneof request { - UploadCacheTaskStartedRequest upload_cache_task_started_request = 4; - UploadCacheTaskFinishedRequest upload_cache_task_finished_request = 5; - UploadCacheTaskFailedRequest upload_cache_task_failed_request = 6; - } +// UploadCacheTaskFinishedRequest represents upload cache task finished request of UploadCacheTaskFinished. +message UploadCacheTaskFinishedRequest {} + +// UploadCacheTaskFailedRequest represents upload cache task failed request of UploadCacheTaskFailed. +message UploadCacheTaskFailedRequest { + // The description of the upload failed. + optional string description = 1; } // StatCacheTaskRequest represents request of StatCacheTask. @@ -449,8 +439,14 @@ service Scheduler{ // DeleteCachePeer releases cache peer in scheduler. rpc DeleteCachePeer(DeleteCachePeerRequest)returns(google.protobuf.Empty); - // UploadCacheTask uploads cache task to scheduler. - rpc UploadCacheTask(stream UploadCacheTaskRequest)returns(common.v2.CacheTask); + // UploadCacheTaskStarted uploads cache task started to scheduler. + rpc UploadCacheTaskStarted(UploadCacheTaskStartedRequest)returns(google.protobuf.Empty); + + // UploadCacheTaskFinished uploads cache task finished to scheduler. + rpc UploadCacheTaskFinished(UploadCacheTaskFinishedRequest)returns(common.v2.CacheTask); + + // UploadCacheTaskFailed uploads cache task failed to scheduler. + rpc UploadCacheTaskFailed(UploadCacheTaskFailedRequest)returns(google.protobuf.Empty); // Checks information of cache task. rpc StatCacheTask(StatCacheTaskRequest)returns(common.v2.CacheTask); diff --git a/src/descriptor.bin b/src/descriptor.bin index 092fc94694ae107fc0c7c7674e9bda93a70d2070..0c759f982a1fd1fbeac561130a8dbaf6fdfc2c5a 100644 GIT binary patch delta 2324 zcmZvde@I(b6vuP!d3ips#?+^^X^d@Z)g~sf_1D_Yt=8$--}FF9DZ7KBKLkPXg9+{8b_fEXiO)k&ky@+kFd`g> zhWdQQ-9tN5v2-Ei-aQmdy`8QTUxndnYAjtVnxgOuyTh|LqtJnPo|lOCLQn#x__i9N zB2)w01Lyg+(^vZXA`mE2l(Y*w>nt1p&mYo>HjkDUkb`X%EXBV$QR4+ zK!X?#L5{zM^E{4P7)j(?*R(KmncAP9oq}Rh4>&*d10xJA*%(HcWe39u zvn(-9R*@9_%~+K`mb&#_oyc@jrMnadt+k3u-eP5HrnVx!h(q&XP5xxe_S493h2<40 znMQsq%-m{+L|I|J?YzRGQ0{8#x9h}K?hs4=nHGBC7oN3jjHjJ*Y zKN&nNdLuMNkB)Cnktu$;0K50t^Q)$*noz@NRPh1QMoj$%x;{eiCqy6tZ&e<#23Vy= zDD?&!6}*wkjmW_pL00bHBbpn*C%#UA|9Seb*)LkA9UDQ_FA7OKf@-5Fq>@LFHu@#9 zjhgyRbbTxeEj$_ew zJESu>j{cY((kP7M{^#wGY{v1>Ydm5BsfG!0vIk#uNwS)9tTd8LIaV4;rli&84$)qu#ZO6Silv<$a+4&DMOCUgd1}+Rw@v*a+MsE% zzn5I59T%M>(~gTgvD4C}-r55?u^BPZ3ytj=N0LL{87$nUTyltzL0{Mo$tHt!2kel5 z89dm|+bkfRoC&|05G-MXseN0MZ*B&sBwBw1{H znV+yEd8Rgpti#`8y+9?U!S}7lZ!ma4K7YX>djEohL-B#3u7p@lLP;`@25t`ZfWqYw zeGbc>wL_xMVe1)w(xT^^+PtK<2A_N<)tmY>yNhbg^1GN%e)FhX_ci^SeDa&e9nUGh zeDa&e7thcQAUD8cY75BD_?!RdXI*Pgb+cA1uUZdzEudbi;2!c?z<}Lw4|y$M%Nwdc z1*Wzr`%^B;E`z7GfV7KFqY6m7=rpQ;w2Mxoyr#A!&RvG)8ZXI~oMw4Rw&XO+OR^j delta 2476 zcmZvdZA=tb6o&WSGdm1-cZ&>2m*s0gzLxz!Sy71;zff1PF_M_3+7yso0YO1oVp^MM zV~nK=txoX97@8OwkcNhambj6Ilom_HHmU#G+NS@T))HfAV`AvJvojrk_;262=Xu{V z=iJ?W@X-F|oOrd)v0Os5_r{6|)jl1|C!l>lR+b}q zNx9VM=;?^H#`eWdw8h(1KZAI@%Wc0}SD*!Nr4#vTomXqRRdua`yhVQot!^xv-&0A0 z{WL4=>(RE1dYmWwV!d&<@N!h~t`G^>Beur8K2DlRZn^q4E9&d%>TZcPwYIdj$C~0T zy`4=*J5F@;w#TAPr(#Lk&PfT$}cBLgR?4y9-V@egH5)gb$Q_XzPOEJGx2Ql*r|N96ju99T@NU6ub zB*dQ3oP1Lv_JkG|u>u{#h-Ips`Np%;NA2jbZ1rtNpJnP;V}N$_S*FE)Q=-o@4OOx} zMx_c>dP;3RPX~8(5jX#`l|;m13XH{6Ao`RlrK}fg{i^(o+Rg#-#JE37-gv&ykA=^u zQp~EcIltK83Z+G!GQPGRZRexJQ-=?d`@v&ue#IOtN`zO;!J@O=5yh^>RlySsz@y{>P$G8$QdgO$7;phH zG7TF%ya@c=Mv}2UK*iO$Xpuxe{GTL9UbINOI{m;8yiPLC2B^3#{T3;1OTU#VZcD!) zUlOe=HdVd^^aFroON!|55-4fRslOQ(Uj`{+^b5F8l*#WwfQsvM8H#q8r=s{Q?AmRx zcozmh+H0JOJB6~yl*kUinw_RZb^s!K3>4pB5Tsqkp}0mUy{1HT5DK@M6461Z-^upi zmV&Y>Yhb&^b7G`EGl-QMD7pH4gJMlX#(Ys=#*jHBlvp}sP6;KN4v8s=)rVC1I@mtq zcVZ-RIE01Q&DDp5=ZzPw9#1d;kCLlLiQEk{03`<8Fc%mSI~q1xLxJS5MT*rATclY1 zupmnrm2rJH!FHd2e3X==-2^3_)i6o6iMB@gPe;k-h7nwvn3Q;kz9W#4ZA!c~Bj5>| z5~n-@8(%Rc#*9E+BlGKq*uyA)vyB9UqaeRz)DUzSg*5$#0sTd1qfl1OHs}Z*j`Ktt z*%TZHS-U}OtC50gLZsyKns$;NoUoz*xd|&u{B%uNQFzrR`RR6y znzW)ML?*2$36V(=m7EaHVv7ITPByQdvL<9lWC}7$jrX%7G6j|O#tY$qrh#tPez{i} zwow^JGHs>Fh)!E+GNRKWEv(NXMU@hKyn|FXBrGHadq_a~%SKuXIwZjDGbP3)plXvT z(J%ou4Xj=_R8(n(`;L)a4KpB{4hkC1fZN=Mf`&6tu+eZ(&~OH}?KUME&OoGvt>ct-)E|00w9QSmR9aVE6>whZZAtG~-6)+Hn z$Q)GfWm|Q`p-S^W4|uAyg~c*{x07Vm&ReVl`=5ubT!VF>)jZ^dO^H_XP`lq~*r`ej zqTwQ~VUDfGWG60U!Rp, - /// Application of task. - #[prost(string, optional, tag = "3")] - pub application: ::core::option::Option<::prost::alloc::string::String>, - /// Task piece length. - #[prost(uint64, tag = "4")] - pub piece_length: u64, - /// TTL of the cache task. - #[prost(message, optional, tag = "5")] - pub ttl: ::core::option::Option<::prost_wkt_types::Duration>, - /// Upload timeout. - #[prost(message, optional, tag = "6")] - pub timeout: ::core::option::Option<::prost_wkt_types::Duration>, -} -/// UploadCacheTaskFinishedRequest represents upload cache task finished request of UploadCacheTaskRequest. -#[derive(serde::Serialize, serde::Deserialize)] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UploadCacheTaskFinishedRequest {} -/// UploadCacheTaskFailedRequest represents upload cache task failed request of UploadCacheTaskRequest. -#[derive(serde::Serialize, serde::Deserialize)] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UploadCacheTaskFailedRequest { - /// The description of the upload failed. - #[prost(string, optional, tag = "1")] - pub description: ::core::option::Option<::prost::alloc::string::String>, -} -/// UploadCacheTaskRequest represents request of UploadCacheTask. -#[derive(serde::Serialize, serde::Deserialize)] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UploadCacheTaskRequest { /// Host id. #[prost(string, tag = "1")] pub host_id: ::prost::alloc::string::String, @@ -619,22 +581,38 @@ pub struct UploadCacheTaskRequest { /// Peer id. #[prost(string, tag = "3")] pub peer_id: ::prost::alloc::string::String, - #[prost(oneof = "upload_cache_task_request::Request", tags = "4, 5, 6")] - pub request: ::core::option::Option, + /// Replica count of the persistent cache task. + #[prost(uint64, tag = "4")] + pub persistent_replica_count: u64, + /// Tag is used to distinguish different cache tasks. + #[prost(string, optional, tag = "5")] + pub tag: ::core::option::Option<::prost::alloc::string::String>, + /// Application of task. + #[prost(string, optional, tag = "6")] + pub application: ::core::option::Option<::prost::alloc::string::String>, + /// Task piece length. + #[prost(uint64, tag = "7")] + pub piece_length: u64, + /// TTL of the cache task. + #[prost(message, optional, tag = "8")] + pub ttl: ::core::option::Option<::prost_wkt_types::Duration>, + /// Upload timeout. + #[prost(message, optional, tag = "9")] + pub timeout: ::core::option::Option<::prost_wkt_types::Duration>, } -/// Nested message and enum types in `UploadCacheTaskRequest`. -pub mod upload_cache_task_request { - #[derive(serde::Serialize, serde::Deserialize)] - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Request { - #[prost(message, tag = "4")] - UploadCacheTaskStartedRequest(super::UploadCacheTaskStartedRequest), - #[prost(message, tag = "5")] - UploadCacheTaskFinishedRequest(super::UploadCacheTaskFinishedRequest), - #[prost(message, tag = "6")] - UploadCacheTaskFailedRequest(super::UploadCacheTaskFailedRequest), - } +/// UploadCacheTaskFinishedRequest represents upload cache task finished request of UploadCacheTaskFinished. +#[derive(serde::Serialize, serde::Deserialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UploadCacheTaskFinishedRequest {} +/// UploadCacheTaskFailedRequest represents upload cache task failed request of UploadCacheTaskFailed. +#[derive(serde::Serialize, serde::Deserialize)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UploadCacheTaskFailedRequest { + /// The description of the upload failed. + #[prost(string, optional, tag = "1")] + pub description: ::core::option::Option<::prost::alloc::string::String>, } /// StatCacheTaskRequest represents request of StatCacheTask. #[derive(serde::Serialize, serde::Deserialize)] @@ -1018,12 +996,35 @@ pub mod scheduler_client { .insert(GrpcMethod::new("scheduler.v2.Scheduler", "DeleteCachePeer")); self.inner.unary(req, path, codec).await } - /// UploadCacheTask uploads cache task to scheduler. - pub async fn upload_cache_task( + /// UploadCacheTaskStarted uploads cache task started to scheduler. + pub async fn upload_cache_task_started( &mut self, - request: impl tonic::IntoStreamingRequest< - Message = super::UploadCacheTaskRequest, - >, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/scheduler.v2.Scheduler/UploadCacheTaskStarted", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("scheduler.v2.Scheduler", "UploadCacheTaskStarted"), + ); + self.inner.unary(req, path, codec).await + } + /// UploadCacheTaskFinished uploads cache task finished to scheduler. + pub async fn upload_cache_task_finished( + &mut self, + request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, tonic::Status, @@ -1039,12 +1040,39 @@ pub mod scheduler_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/scheduler.v2.Scheduler/UploadCacheTask", + "/scheduler.v2.Scheduler/UploadCacheTaskFinished", ); - let mut req = request.into_streaming_request(); + let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("scheduler.v2.Scheduler", "UploadCacheTask")); - self.inner.client_streaming(req, path, codec).await + .insert( + GrpcMethod::new("scheduler.v2.Scheduler", "UploadCacheTaskFinished"), + ); + self.inner.unary(req, path, codec).await + } + /// UploadCacheTaskFailed uploads cache task failed to scheduler. + pub async fn upload_cache_task_failed( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/scheduler.v2.Scheduler/UploadCacheTaskFailed", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("scheduler.v2.Scheduler", "UploadCacheTaskFailed"), + ); + self.inner.unary(req, path, codec).await } /// Checks information of cache task. pub async fn stat_cache_task( @@ -1195,14 +1223,24 @@ pub mod scheduler_server { &self, request: tonic::Request, ) -> std::result::Result, tonic::Status>; - /// UploadCacheTask uploads cache task to scheduler. - async fn upload_cache_task( + /// UploadCacheTaskStarted uploads cache task started to scheduler. + async fn upload_cache_task_started( &self, - request: tonic::Request>, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// UploadCacheTaskFinished uploads cache task finished to scheduler. + async fn upload_cache_task_finished( + &self, + request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; + /// UploadCacheTaskFailed uploads cache task failed to scheduler. + async fn upload_cache_task_failed( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; /// Checks information of cache task. async fn stat_cache_task( &self, @@ -1800,28 +1838,25 @@ pub mod scheduler_server { }; Box::pin(fut) } - "/scheduler.v2.Scheduler/UploadCacheTask" => { + "/scheduler.v2.Scheduler/UploadCacheTaskStarted" => { #[allow(non_camel_case_types)] - struct UploadCacheTaskSvc(pub Arc); + struct UploadCacheTaskStartedSvc(pub Arc); impl< T: Scheduler, - > tonic::server::ClientStreamingService< - super::UploadCacheTaskRequest, - > for UploadCacheTaskSvc { - type Response = super::super::super::common::v2::CacheTask; + > tonic::server::UnaryService + for UploadCacheTaskStartedSvc { + type Response = (); type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - tonic::Streaming, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - (*inner).upload_cache_task(request).await + (*inner).upload_cache_task_started(request).await }; Box::pin(fut) } @@ -1833,7 +1868,7 @@ pub mod scheduler_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UploadCacheTaskSvc(inner); + let method = UploadCacheTaskStartedSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1844,7 +1879,101 @@ pub mod scheduler_server { max_decoding_message_size, max_encoding_message_size, ); - let res = grpc.client_streaming(method, req).await; + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/scheduler.v2.Scheduler/UploadCacheTaskFinished" => { + #[allow(non_camel_case_types)] + struct UploadCacheTaskFinishedSvc(pub Arc); + impl< + T: Scheduler, + > tonic::server::UnaryService + for UploadCacheTaskFinishedSvc { + type Response = super::super::super::common::v2::CacheTask; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::UploadCacheTaskFinishedRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).upload_cache_task_finished(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UploadCacheTaskFinishedSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/scheduler.v2.Scheduler/UploadCacheTaskFailed" => { + #[allow(non_camel_case_types)] + struct UploadCacheTaskFailedSvc(pub Arc); + impl< + T: Scheduler, + > tonic::server::UnaryService + for UploadCacheTaskFailedSvc { + type Response = (); + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).upload_cache_task_failed(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UploadCacheTaskFailedSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut)