// // Copyright 2022 The Dragonfly Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 // protoc v3.19.4 // source: pkg/apis/scheduler/v1/scheduler.proto package v1 import ( context "context" v1 "d7y.io/api/pkg/apis/common/v1" v11 "d7y.io/api/pkg/apis/errordetails/v1" _ "github.com/envoyproxy/protoc-gen-validate/validate" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // PeerTaskRequest represents request of RegisterPeerTask. type PeerTaskRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Download url. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // URL meta info. UrlMeta *v1.UrlMeta `protobuf:"bytes,2,opt,name=url_meta,json=urlMeta,proto3" json:"url_meta,omitempty"` // Peer id and it must be global uniqueness. PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` // Peer host info. PeerHost *PeerHost `protobuf:"bytes,4,opt,name=peer_host,json=peerHost,proto3" json:"peer_host,omitempty"` // Peer host load. HostLoad *v1.HostLoad `protobuf:"bytes,5,opt,name=host_load,json=hostLoad,proto3" json:"host_load,omitempty"` // Whether this request is caused by migration. IsMigrating bool `protobuf:"varint,6,opt,name=is_migrating,json=isMigrating,proto3" json:"is_migrating,omitempty"` // Pattern includes p2p, seed-peer and source. Pattern v1.Pattern `protobuf:"varint,7,opt,name=pattern,proto3,enum=common.Pattern" json:"pattern,omitempty"` // Task id. TaskId string `protobuf:"bytes,8,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` } func (x *PeerTaskRequest) Reset() { *x = PeerTaskRequest{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PeerTaskRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*PeerTaskRequest) ProtoMessage() {} func (x *PeerTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[0] 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 PeerTaskRequest.ProtoReflect.Descriptor instead. func (*PeerTaskRequest) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{0} } func (x *PeerTaskRequest) GetUrl() string { if x != nil { return x.Url } return "" } func (x *PeerTaskRequest) GetUrlMeta() *v1.UrlMeta { if x != nil { return x.UrlMeta } return nil } func (x *PeerTaskRequest) GetPeerId() string { if x != nil { return x.PeerId } return "" } func (x *PeerTaskRequest) GetPeerHost() *PeerHost { if x != nil { return x.PeerHost } return nil } func (x *PeerTaskRequest) GetHostLoad() *v1.HostLoad { if x != nil { return x.HostLoad } return nil } func (x *PeerTaskRequest) GetIsMigrating() bool { if x != nil { return x.IsMigrating } return false } func (x *PeerTaskRequest) GetPattern() v1.Pattern { if x != nil { return x.Pattern } return v1.Pattern(0) } func (x *PeerTaskRequest) GetTaskId() string { if x != nil { return x.TaskId } return "" } // RegisterResult represents response of RegisterPeerTask. type RegisterResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task type. TaskType v1.TaskType `protobuf:"varint,1,opt,name=task_type,json=taskType,proto3,enum=common.TaskType" json:"task_type,omitempty"` // Task id TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // File size scope. SizeScope v1.SizeScope `protobuf:"varint,3,opt,name=size_scope,json=sizeScope,proto3,enum=common.SizeScope" json:"size_scope,omitempty"` // Download the only piece directly for small or tiny file. // // Types that are assignable to DirectPiece: // *RegisterResult_SinglePiece // *RegisterResult_PieceContent DirectPiece isRegisterResult_DirectPiece `protobuf_oneof:"direct_piece"` // Task extend attribute, // only direct_piece will carry extend attribute. ExtendAttribute *v1.ExtendAttribute `protobuf:"bytes,6,opt,name=extend_attribute,json=extendAttribute,proto3" json:"extend_attribute,omitempty"` } func (x *RegisterResult) Reset() { *x = RegisterResult{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RegisterResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*RegisterResult) ProtoMessage() {} func (x *RegisterResult) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[1] 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 RegisterResult.ProtoReflect.Descriptor instead. func (*RegisterResult) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{1} } func (x *RegisterResult) GetTaskType() v1.TaskType { if x != nil { return x.TaskType } return v1.TaskType(0) } func (x *RegisterResult) GetTaskId() string { if x != nil { return x.TaskId } return "" } func (x *RegisterResult) GetSizeScope() v1.SizeScope { if x != nil { return x.SizeScope } return v1.SizeScope(0) } func (m *RegisterResult) GetDirectPiece() isRegisterResult_DirectPiece { if m != nil { return m.DirectPiece } return nil } func (x *RegisterResult) GetSinglePiece() *SinglePiece { if x, ok := x.GetDirectPiece().(*RegisterResult_SinglePiece); ok { return x.SinglePiece } return nil } func (x *RegisterResult) GetPieceContent() []byte { if x, ok := x.GetDirectPiece().(*RegisterResult_PieceContent); ok { return x.PieceContent } return nil } func (x *RegisterResult) GetExtendAttribute() *v1.ExtendAttribute { if x != nil { return x.ExtendAttribute } return nil } type isRegisterResult_DirectPiece interface { isRegisterResult_DirectPiece() } type RegisterResult_SinglePiece struct { // Return single piece info when size scope is small. SinglePiece *SinglePiece `protobuf:"bytes,4,opt,name=single_piece,json=singlePiece,proto3,oneof"` } type RegisterResult_PieceContent struct { // Return task content when size scope is tiny. PieceContent []byte `protobuf:"bytes,5,opt,name=piece_content,json=pieceContent,proto3,oneof"` } func (*RegisterResult_SinglePiece) isRegisterResult_DirectPiece() {} func (*RegisterResult_PieceContent) isRegisterResult_DirectPiece() {} // SinglePiece represents information of single piece. type SinglePiece struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Destination peer id. DstPid string `protobuf:"bytes,1,opt,name=dst_pid,json=dstPid,proto3" json:"dst_pid,omitempty"` // Destination download address. DstAddr string `protobuf:"bytes,2,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` // Piece info. PieceInfo *v1.PieceInfo `protobuf:"bytes,3,opt,name=piece_info,json=pieceInfo,proto3" json:"piece_info,omitempty"` } func (x *SinglePiece) Reset() { *x = SinglePiece{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SinglePiece) String() string { return protoimpl.X.MessageStringOf(x) } func (*SinglePiece) ProtoMessage() {} func (x *SinglePiece) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[2] 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 SinglePiece.ProtoReflect.Descriptor instead. func (*SinglePiece) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{2} } func (x *SinglePiece) GetDstPid() string { if x != nil { return x.DstPid } return "" } func (x *SinglePiece) GetDstAddr() string { if x != nil { return x.DstAddr } return "" } func (x *SinglePiece) GetPieceInfo() *v1.PieceInfo { if x != nil { return x.PieceInfo } return nil } // PeerHost represents information of peer host. type PeerHost struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Peer host id. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // peer host ip Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` // Port of grpc service. RpcPort int32 `protobuf:"varint,3,opt,name=rpc_port,json=rpcPort,proto3" json:"rpc_port,omitempty"` // Port of download server. DownPort int32 `protobuf:"varint,4,opt,name=down_port,json=downPort,proto3" json:"down_port,omitempty"` // Peer hostname. HostName string `protobuf:"bytes,5,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` // Security domain for network. SecurityDomain string `protobuf:"bytes,6,opt,name=security_domain,json=securityDomain,proto3" json:"security_domain,omitempty"` // Location path(area|country|province|city|...). Location string `protobuf:"bytes,7,opt,name=location,proto3" json:"location,omitempty"` // IDC where the peer host is located Idc string `protobuf:"bytes,8,opt,name=idc,proto3" json:"idc,omitempty"` // Network topology(switch|router|...). NetTopology string `protobuf:"bytes,9,opt,name=net_topology,json=netTopology,proto3" json:"net_topology,omitempty"` } func (x *PeerHost) Reset() { *x = PeerHost{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PeerHost) String() string { return protoimpl.X.MessageStringOf(x) } func (*PeerHost) ProtoMessage() {} func (x *PeerHost) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[3] 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 PeerHost.ProtoReflect.Descriptor instead. func (*PeerHost) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{3} } func (x *PeerHost) GetId() string { if x != nil { return x.Id } return "" } func (x *PeerHost) GetIp() string { if x != nil { return x.Ip } return "" } func (x *PeerHost) GetRpcPort() int32 { if x != nil { return x.RpcPort } return 0 } func (x *PeerHost) GetDownPort() int32 { if x != nil { return x.DownPort } return 0 } func (x *PeerHost) GetHostName() string { if x != nil { return x.HostName } return "" } func (x *PeerHost) GetSecurityDomain() string { if x != nil { return x.SecurityDomain } return "" } func (x *PeerHost) GetLocation() string { if x != nil { return x.Location } return "" } func (x *PeerHost) GetIdc() string { if x != nil { return x.Idc } return "" } func (x *PeerHost) GetNetTopology() string { if x != nil { return x.NetTopology } return "" } // PieceResult represents request of ReportPieceResult. type PieceResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task id. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // Source peer id. SrcPid string `protobuf:"bytes,2,opt,name=src_pid,json=srcPid,proto3" json:"src_pid,omitempty"` // Destination peer id. DstPid string `protobuf:"bytes,3,opt,name=dst_pid,json=dstPid,proto3" json:"dst_pid,omitempty"` // Piece info. PieceInfo *v1.PieceInfo `protobuf:"bytes,4,opt,name=piece_info,json=pieceInfo,proto3" json:"piece_info,omitempty"` // Begin time of the piece downloading. BeginTime uint64 `protobuf:"varint,5,opt,name=begin_time,json=beginTime,proto3" json:"begin_time,omitempty"` // End time of the piece downloading. EndTime uint64 `protobuf:"varint,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Whether the piece downloading is successfully. Success bool `protobuf:"varint,7,opt,name=success,proto3" json:"success,omitempty"` // Result code. Code v1.Code `protobuf:"varint,8,opt,name=code,proto3,enum=common.Code" json:"code,omitempty"` // Peer host load. HostLoad *v1.HostLoad `protobuf:"bytes,9,opt,name=host_load,json=hostLoad,proto3" json:"host_load,omitempty"` // Finished count. FinishedCount int32 `protobuf:"varint,10,opt,name=finished_count,json=finishedCount,proto3" json:"finished_count,omitempty"` // Task extend attribute, // only first success back source piece will carry extend attribute. ExtendAttribute *v1.ExtendAttribute `protobuf:"bytes,11,opt,name=extend_attribute,json=extendAttribute,proto3" json:"extend_attribute,omitempty"` } func (x *PieceResult) Reset() { *x = PieceResult{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PieceResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*PieceResult) ProtoMessage() {} func (x *PieceResult) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[4] 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 PieceResult.ProtoReflect.Descriptor instead. func (*PieceResult) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{4} } func (x *PieceResult) GetTaskId() string { if x != nil { return x.TaskId } return "" } func (x *PieceResult) GetSrcPid() string { if x != nil { return x.SrcPid } return "" } func (x *PieceResult) GetDstPid() string { if x != nil { return x.DstPid } return "" } func (x *PieceResult) GetPieceInfo() *v1.PieceInfo { if x != nil { return x.PieceInfo } return nil } func (x *PieceResult) GetBeginTime() uint64 { if x != nil { return x.BeginTime } return 0 } func (x *PieceResult) GetEndTime() uint64 { if x != nil { return x.EndTime } return 0 } func (x *PieceResult) GetSuccess() bool { if x != nil { return x.Success } return false } func (x *PieceResult) GetCode() v1.Code { if x != nil { return x.Code } return v1.Code(0) } func (x *PieceResult) GetHostLoad() *v1.HostLoad { if x != nil { return x.HostLoad } return nil } func (x *PieceResult) GetFinishedCount() int32 { if x != nil { return x.FinishedCount } return 0 } func (x *PieceResult) GetExtendAttribute() *v1.ExtendAttribute { if x != nil { return x.ExtendAttribute } return nil } // PeerPacket represents response of ReportPieceResult. type PeerPacket struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task id. TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // Source peer id. SrcPid string `protobuf:"bytes,3,opt,name=src_pid,json=srcPid,proto3" json:"src_pid,omitempty"` // Concurrent downloading count from main peer. ParallelCount int32 `protobuf:"varint,4,opt,name=parallel_count,json=parallelCount,proto3" json:"parallel_count,omitempty"` // Main peer. MainPeer *PeerPacket_DestPeer `protobuf:"bytes,5,opt,name=main_peer,json=mainPeer,proto3" json:"main_peer,omitempty"` // Candidate peers. CandidatePeers []*PeerPacket_DestPeer `protobuf:"bytes,6,rep,name=candidate_peers,json=candidatePeers,proto3" json:"candidate_peers,omitempty"` // Result code. Code v1.Code `protobuf:"varint,7,opt,name=code,proto3,enum=common.Code" json:"code,omitempty"` // Error detail. // // Types that are assignable to Errordetails: // *PeerPacket_SourceError Errordetails isPeerPacket_Errordetails `protobuf_oneof:"errordetails"` } func (x *PeerPacket) Reset() { *x = PeerPacket{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PeerPacket) String() string { return protoimpl.X.MessageStringOf(x) } func (*PeerPacket) ProtoMessage() {} func (x *PeerPacket) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[5] 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 PeerPacket.ProtoReflect.Descriptor instead. func (*PeerPacket) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{5} } func (x *PeerPacket) GetTaskId() string { if x != nil { return x.TaskId } return "" } func (x *PeerPacket) GetSrcPid() string { if x != nil { return x.SrcPid } return "" } func (x *PeerPacket) GetParallelCount() int32 { if x != nil { return x.ParallelCount } return 0 } func (x *PeerPacket) GetMainPeer() *PeerPacket_DestPeer { if x != nil { return x.MainPeer } return nil } func (x *PeerPacket) GetCandidatePeers() []*PeerPacket_DestPeer { if x != nil { return x.CandidatePeers } return nil } func (x *PeerPacket) GetCode() v1.Code { if x != nil { return x.Code } return v1.Code(0) } func (m *PeerPacket) GetErrordetails() isPeerPacket_Errordetails { if m != nil { return m.Errordetails } return nil } func (x *PeerPacket) GetSourceError() *v11.SourceError { if x, ok := x.GetErrordetails().(*PeerPacket_SourceError); ok { return x.SourceError } return nil } type isPeerPacket_Errordetails interface { isPeerPacket_Errordetails() } type PeerPacket_SourceError struct { // Source error. SourceError *v11.SourceError `protobuf:"bytes,8,opt,name=source_error,json=sourceError,proto3,oneof"` } func (*PeerPacket_SourceError) isPeerPacket_Errordetails() {} // PeerResult represents response of ReportPeerResult. type PeerResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task id. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // Peer id. PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` // Source host ip. SrcIp string `protobuf:"bytes,3,opt,name=src_ip,json=srcIp,proto3" json:"src_ip,omitempty"` // Security domain. SecurityDomain string `protobuf:"bytes,4,opt,name=security_domain,json=securityDomain,proto3" json:"security_domain,omitempty"` // IDC where the peer host is located Idc string `protobuf:"bytes,5,opt,name=idc,proto3" json:"idc,omitempty"` // Download url. Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"` // Total content length. ContentLength int64 `protobuf:"varint,7,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"` // Total network traffic. Traffic uint64 `protobuf:"varint,8,opt,name=traffic,proto3" json:"traffic,omitempty"` // Total cost time. Cost uint32 `protobuf:"varint,9,opt,name=cost,proto3" json:"cost,omitempty"` // Whether peer downloading file is successfully. Success bool `protobuf:"varint,10,opt,name=success,proto3" json:"success,omitempty"` // Result code. Code v1.Code `protobuf:"varint,11,opt,name=code,proto3,enum=common.Code" json:"code,omitempty"` // Task total piece count. TotalPieceCount int32 `protobuf:"varint,12,opt,name=total_piece_count,json=totalPieceCount,proto3" json:"total_piece_count,omitempty"` // Error detail. // // Types that are assignable to Errordetails: // *PeerResult_SourceError Errordetails isPeerResult_Errordetails `protobuf_oneof:"errordetails"` } func (x *PeerResult) Reset() { *x = PeerResult{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PeerResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*PeerResult) ProtoMessage() {} func (x *PeerResult) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[6] 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 PeerResult.ProtoReflect.Descriptor instead. func (*PeerResult) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{6} } func (x *PeerResult) GetTaskId() string { if x != nil { return x.TaskId } return "" } func (x *PeerResult) GetPeerId() string { if x != nil { return x.PeerId } return "" } func (x *PeerResult) GetSrcIp() string { if x != nil { return x.SrcIp } return "" } func (x *PeerResult) GetSecurityDomain() string { if x != nil { return x.SecurityDomain } return "" } func (x *PeerResult) GetIdc() string { if x != nil { return x.Idc } return "" } func (x *PeerResult) GetUrl() string { if x != nil { return x.Url } return "" } func (x *PeerResult) GetContentLength() int64 { if x != nil { return x.ContentLength } return 0 } func (x *PeerResult) GetTraffic() uint64 { if x != nil { return x.Traffic } return 0 } func (x *PeerResult) GetCost() uint32 { if x != nil { return x.Cost } return 0 } func (x *PeerResult) GetSuccess() bool { if x != nil { return x.Success } return false } func (x *PeerResult) GetCode() v1.Code { if x != nil { return x.Code } return v1.Code(0) } func (x *PeerResult) GetTotalPieceCount() int32 { if x != nil { return x.TotalPieceCount } return 0 } func (m *PeerResult) GetErrordetails() isPeerResult_Errordetails { if m != nil { return m.Errordetails } return nil } func (x *PeerResult) GetSourceError() *v11.SourceError { if x, ok := x.GetErrordetails().(*PeerResult_SourceError); ok { return x.SourceError } return nil } type isPeerResult_Errordetails interface { isPeerResult_Errordetails() } type PeerResult_SourceError struct { // Source error. SourceError *v11.SourceError `protobuf:"bytes,13,opt,name=source_error,json=sourceError,proto3,oneof"` } func (*PeerResult_SourceError) isPeerResult_Errordetails() {} // PeerTarget represents request of LeaveTask. type PeerTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task id. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // Peer id. PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` } func (x *PeerTarget) Reset() { *x = PeerTarget{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PeerTarget) String() string { return protoimpl.X.MessageStringOf(x) } func (*PeerTarget) ProtoMessage() {} func (x *PeerTarget) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use PeerTarget.ProtoReflect.Descriptor instead. func (*PeerTarget) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{7} } func (x *PeerTarget) GetTaskId() string { if x != nil { return x.TaskId } return "" } func (x *PeerTarget) GetPeerId() string { if x != nil { return x.PeerId } return "" } // StatTaskRequest represents request of StatTask. type StatTaskRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task id. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` } func (x *StatTaskRequest) Reset() { *x = StatTaskRequest{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StatTaskRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*StatTaskRequest) ProtoMessage() {} func (x *StatTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[8] 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 StatTaskRequest.ProtoReflect.Descriptor instead. func (*StatTaskRequest) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{8} } func (x *StatTaskRequest) GetTaskId() string { if x != nil { return x.TaskId } return "" } // Task represents download task. type Task struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task id. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Task type. Type v1.TaskType `protobuf:"varint,2,opt,name=type,proto3,enum=common.TaskType" json:"type,omitempty"` // Task content length. ContentLength int64 `protobuf:"varint,3,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"` // Task total piece count. TotalPieceCount int32 `protobuf:"varint,4,opt,name=total_piece_count,json=totalPieceCount,proto3" json:"total_piece_count,omitempty"` // Task state. State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` // Task peer count. PeerCount int32 `protobuf:"varint,6,opt,name=peer_count,json=peerCount,proto3" json:"peer_count,omitempty"` // Task contains available peer. HasAvailablePeer bool `protobuf:"varint,7,opt,name=hasAvailablePeer,proto3" json:"hasAvailablePeer,omitempty"` } func (x *Task) Reset() { *x = Task{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Task) String() string { return protoimpl.X.MessageStringOf(x) } func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[9] 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 Task.ProtoReflect.Descriptor instead. func (*Task) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{9} } func (x *Task) GetId() string { if x != nil { return x.Id } return "" } func (x *Task) GetType() v1.TaskType { if x != nil { return x.Type } return v1.TaskType(0) } func (x *Task) GetContentLength() int64 { if x != nil { return x.ContentLength } return 0 } func (x *Task) GetTotalPieceCount() int32 { if x != nil { return x.TotalPieceCount } return 0 } func (x *Task) GetState() string { if x != nil { return x.State } return "" } func (x *Task) GetPeerCount() int32 { if x != nil { return x.PeerCount } return 0 } func (x *Task) GetHasAvailablePeer() bool { if x != nil { return x.HasAvailablePeer } return false } // AnnounceTaskRequest represents request of AnnounceTask. type AnnounceTaskRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Task id. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // Download url. Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // URL meta info. UrlMeta *v1.UrlMeta `protobuf:"bytes,3,opt,name=url_meta,json=urlMeta,proto3" json:"url_meta,omitempty"` // Peer host info. PeerHost *PeerHost `protobuf:"bytes,4,opt,name=peer_host,json=peerHost,proto3" json:"peer_host,omitempty"` // Task piece info. PiecePacket *v1.PiecePacket `protobuf:"bytes,5,opt,name=piece_packet,json=piecePacket,proto3" json:"piece_packet,omitempty"` // Task type. TaskType v1.TaskType `protobuf:"varint,6,opt,name=task_type,json=taskType,proto3,enum=common.TaskType" json:"task_type,omitempty"` } func (x *AnnounceTaskRequest) Reset() { *x = AnnounceTaskRequest{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AnnounceTaskRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*AnnounceTaskRequest) ProtoMessage() {} func (x *AnnounceTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use AnnounceTaskRequest.ProtoReflect.Descriptor instead. func (*AnnounceTaskRequest) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{10} } func (x *AnnounceTaskRequest) GetTaskId() string { if x != nil { return x.TaskId } return "" } func (x *AnnounceTaskRequest) GetUrl() string { if x != nil { return x.Url } return "" } func (x *AnnounceTaskRequest) GetUrlMeta() *v1.UrlMeta { if x != nil { return x.UrlMeta } return nil } func (x *AnnounceTaskRequest) GetPeerHost() *PeerHost { if x != nil { return x.PeerHost } return nil } func (x *AnnounceTaskRequest) GetPiecePacket() *v1.PiecePacket { if x != nil { return x.PiecePacket } return nil } func (x *AnnounceTaskRequest) GetTaskType() v1.TaskType { if x != nil { return x.TaskType } return v1.TaskType(0) } type PeerPacket_DestPeer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Destination ip. Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // Port of grpc service. RpcPort int32 `protobuf:"varint,2,opt,name=rpc_port,json=rpcPort,proto3" json:"rpc_port,omitempty"` // Destination peer id. PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` } func (x *PeerPacket_DestPeer) Reset() { *x = PeerPacket_DestPeer{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PeerPacket_DestPeer) String() string { return protoimpl.X.MessageStringOf(x) } func (*PeerPacket_DestPeer) ProtoMessage() {} func (x *PeerPacket_DestPeer) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use PeerPacket_DestPeer.ProtoReflect.Descriptor instead. func (*PeerPacket_DestPeer) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{5, 0} } func (x *PeerPacket_DestPeer) GetIp() string { if x != nil { return x.Ip } return "" } func (x *PeerPacket_DestPeer) GetRpcPort() int32 { if x != nil { return x.RpcPort } return 0 } func (x *PeerPacket_DestPeer) GetPeerId() string { if x != nil { return x.PeerId } return "" } var File_pkg_apis_scheduler_v1_scheduler_proto protoreflect.FileDescriptor var file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc = []byte{ 0x0a, 0x25, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x1a, 0x1f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x02, 0x0a, 0x0f, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x88, 0x01, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x34, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x12, 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, 0x30, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0xd5, 0x02, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2d, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 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, 0x3a, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x69, 0x65, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x0b, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x64, 0x73, 0x74, 0x50, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x64, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x30, 0x0a, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xb0, 0x02, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x27, 0x0a, 0x08, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x07, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x22, 0xac, 0x03, 0x0a, 0x0b, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x72, 0x63, 0x50, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x73, 0x74, 0x50, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0xe8, 0x03, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 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, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x72, 0x63, 0x50, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x65, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x6e, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x27, 0x0a, 0x08, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x07, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 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, 0x42, 0x0e, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xf8, 0x03, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x73, 0x72, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x05, 0x73, 0x72, 0x63, 0x49, 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x1a, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x88, 0x01, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x37, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x22, 0x0b, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x1a, 0x0b, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x50, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9d, 0x02, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x28, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x33, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x00, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x68, 0x61, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x65, 0x72, 0x22, 0xaf, 0x02, 0x0a, 0x13, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x88, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x34, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x32, 0x9e, 0x03, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x46, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x22, 0x5a, 0x20, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_pkg_apis_scheduler_v1_scheduler_proto_rawDescOnce sync.Once file_pkg_apis_scheduler_v1_scheduler_proto_rawDescData = file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc ) func file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP() []byte { file_pkg_apis_scheduler_v1_scheduler_proto_rawDescOnce.Do(func() { file_pkg_apis_scheduler_v1_scheduler_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_apis_scheduler_v1_scheduler_proto_rawDescData) }) return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescData } var file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_pkg_apis_scheduler_v1_scheduler_proto_goTypes = []interface{}{ (*PeerTaskRequest)(nil), // 0: scheduler.PeerTaskRequest (*RegisterResult)(nil), // 1: scheduler.RegisterResult (*SinglePiece)(nil), // 2: scheduler.SinglePiece (*PeerHost)(nil), // 3: scheduler.PeerHost (*PieceResult)(nil), // 4: scheduler.PieceResult (*PeerPacket)(nil), // 5: scheduler.PeerPacket (*PeerResult)(nil), // 6: scheduler.PeerResult (*PeerTarget)(nil), // 7: scheduler.PeerTarget (*StatTaskRequest)(nil), // 8: scheduler.StatTaskRequest (*Task)(nil), // 9: scheduler.Task (*AnnounceTaskRequest)(nil), // 10: scheduler.AnnounceTaskRequest (*PeerPacket_DestPeer)(nil), // 11: scheduler.PeerPacket.DestPeer (*v1.UrlMeta)(nil), // 12: common.UrlMeta (*v1.HostLoad)(nil), // 13: common.HostLoad (v1.Pattern)(0), // 14: common.Pattern (v1.TaskType)(0), // 15: common.TaskType (v1.SizeScope)(0), // 16: common.SizeScope (*v1.ExtendAttribute)(nil), // 17: common.ExtendAttribute (*v1.PieceInfo)(nil), // 18: common.PieceInfo (v1.Code)(0), // 19: common.Code (*v11.SourceError)(nil), // 20: errordetails.SourceError (*v1.PiecePacket)(nil), // 21: common.PiecePacket (*emptypb.Empty)(nil), // 22: google.protobuf.Empty } var file_pkg_apis_scheduler_v1_scheduler_proto_depIdxs = []int32{ 12, // 0: scheduler.PeerTaskRequest.url_meta:type_name -> common.UrlMeta 3, // 1: scheduler.PeerTaskRequest.peer_host:type_name -> scheduler.PeerHost 13, // 2: scheduler.PeerTaskRequest.host_load:type_name -> common.HostLoad 14, // 3: scheduler.PeerTaskRequest.pattern:type_name -> common.Pattern 15, // 4: scheduler.RegisterResult.task_type:type_name -> common.TaskType 16, // 5: scheduler.RegisterResult.size_scope:type_name -> common.SizeScope 2, // 6: scheduler.RegisterResult.single_piece:type_name -> scheduler.SinglePiece 17, // 7: scheduler.RegisterResult.extend_attribute:type_name -> common.ExtendAttribute 18, // 8: scheduler.SinglePiece.piece_info:type_name -> common.PieceInfo 18, // 9: scheduler.PieceResult.piece_info:type_name -> common.PieceInfo 19, // 10: scheduler.PieceResult.code:type_name -> common.Code 13, // 11: scheduler.PieceResult.host_load:type_name -> common.HostLoad 17, // 12: scheduler.PieceResult.extend_attribute:type_name -> common.ExtendAttribute 11, // 13: scheduler.PeerPacket.main_peer:type_name -> scheduler.PeerPacket.DestPeer 11, // 14: scheduler.PeerPacket.candidate_peers:type_name -> scheduler.PeerPacket.DestPeer 19, // 15: scheduler.PeerPacket.code:type_name -> common.Code 20, // 16: scheduler.PeerPacket.source_error:type_name -> errordetails.SourceError 19, // 17: scheduler.PeerResult.code:type_name -> common.Code 20, // 18: scheduler.PeerResult.source_error:type_name -> errordetails.SourceError 15, // 19: scheduler.Task.type:type_name -> common.TaskType 12, // 20: scheduler.AnnounceTaskRequest.url_meta:type_name -> common.UrlMeta 3, // 21: scheduler.AnnounceTaskRequest.peer_host:type_name -> scheduler.PeerHost 21, // 22: scheduler.AnnounceTaskRequest.piece_packet:type_name -> common.PiecePacket 15, // 23: scheduler.AnnounceTaskRequest.task_type:type_name -> common.TaskType 0, // 24: scheduler.Scheduler.RegisterPeerTask:input_type -> scheduler.PeerTaskRequest 4, // 25: scheduler.Scheduler.ReportPieceResult:input_type -> scheduler.PieceResult 6, // 26: scheduler.Scheduler.ReportPeerResult:input_type -> scheduler.PeerResult 7, // 27: scheduler.Scheduler.LeaveTask:input_type -> scheduler.PeerTarget 8, // 28: scheduler.Scheduler.StatTask:input_type -> scheduler.StatTaskRequest 10, // 29: scheduler.Scheduler.AnnounceTask:input_type -> scheduler.AnnounceTaskRequest 1, // 30: scheduler.Scheduler.RegisterPeerTask:output_type -> scheduler.RegisterResult 5, // 31: scheduler.Scheduler.ReportPieceResult:output_type -> scheduler.PeerPacket 22, // 32: scheduler.Scheduler.ReportPeerResult:output_type -> google.protobuf.Empty 22, // 33: scheduler.Scheduler.LeaveTask:output_type -> google.protobuf.Empty 9, // 34: scheduler.Scheduler.StatTask:output_type -> scheduler.Task 22, // 35: scheduler.Scheduler.AnnounceTask:output_type -> google.protobuf.Empty 30, // [30:36] is the sub-list for method output_type 24, // [24:30] is the sub-list for method input_type 24, // [24:24] is the sub-list for extension type_name 24, // [24:24] is the sub-list for extension extendee 0, // [0:24] is the sub-list for field type_name } func init() { file_pkg_apis_scheduler_v1_scheduler_proto_init() } func file_pkg_apis_scheduler_v1_scheduler_proto_init() { if File_pkg_apis_scheduler_v1_scheduler_proto != nil { return } if !protoimpl.UnsafeEnabled { file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerTaskRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SinglePiece); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerHost); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PieceResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerPacket); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerTarget); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatTaskRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Task); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnnounceTaskRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerPacket_DestPeer); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[1].OneofWrappers = []interface{}{ (*RegisterResult_SinglePiece)(nil), (*RegisterResult_PieceContent)(nil), } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[5].OneofWrappers = []interface{}{ (*PeerPacket_SourceError)(nil), } file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[6].OneofWrappers = []interface{}{ (*PeerResult_SourceError)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc, NumEnums: 0, NumMessages: 12, NumExtensions: 0, NumServices: 1, }, GoTypes: file_pkg_apis_scheduler_v1_scheduler_proto_goTypes, DependencyIndexes: file_pkg_apis_scheduler_v1_scheduler_proto_depIdxs, MessageInfos: file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes, }.Build() File_pkg_apis_scheduler_v1_scheduler_proto = out.File file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc = nil file_pkg_apis_scheduler_v1_scheduler_proto_goTypes = nil file_pkg_apis_scheduler_v1_scheduler_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion6 // SchedulerClient is the client API for Scheduler service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type SchedulerClient interface { // RegisterPeerTask registers a peer into task. RegisterPeerTask(ctx context.Context, in *PeerTaskRequest, opts ...grpc.CallOption) (*RegisterResult, error) // ReportPieceResult reports piece results and receives peer packets. ReportPieceResult(ctx context.Context, opts ...grpc.CallOption) (Scheduler_ReportPieceResultClient, error) // ReportPeerResult reports downloading result for the peer. ReportPeerResult(ctx context.Context, in *PeerResult, opts ...grpc.CallOption) (*emptypb.Empty, error) // LeaveTask makes the peer leaving from task. LeaveTask(ctx context.Context, in *PeerTarget, opts ...grpc.CallOption) (*emptypb.Empty, error) // Checks if any peer has the given task. StatTask(ctx context.Context, in *StatTaskRequest, opts ...grpc.CallOption) (*Task, error) // A peer announces that it has the announced task to other peers. AnnounceTask(ctx context.Context, in *AnnounceTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type schedulerClient struct { cc grpc.ClientConnInterface } func NewSchedulerClient(cc grpc.ClientConnInterface) SchedulerClient { return &schedulerClient{cc} } func (c *schedulerClient) RegisterPeerTask(ctx context.Context, in *PeerTaskRequest, opts ...grpc.CallOption) (*RegisterResult, error) { out := new(RegisterResult) err := c.cc.Invoke(ctx, "/scheduler.Scheduler/RegisterPeerTask", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *schedulerClient) ReportPieceResult(ctx context.Context, opts ...grpc.CallOption) (Scheduler_ReportPieceResultClient, error) { stream, err := c.cc.NewStream(ctx, &_Scheduler_serviceDesc.Streams[0], "/scheduler.Scheduler/ReportPieceResult", opts...) if err != nil { return nil, err } x := &schedulerReportPieceResultClient{stream} return x, nil } type Scheduler_ReportPieceResultClient interface { Send(*PieceResult) error Recv() (*PeerPacket, error) grpc.ClientStream } type schedulerReportPieceResultClient struct { grpc.ClientStream } func (x *schedulerReportPieceResultClient) Send(m *PieceResult) error { return x.ClientStream.SendMsg(m) } func (x *schedulerReportPieceResultClient) Recv() (*PeerPacket, error) { m := new(PeerPacket) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *schedulerClient) ReportPeerResult(ctx context.Context, in *PeerResult, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/scheduler.Scheduler/ReportPeerResult", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *schedulerClient) LeaveTask(ctx context.Context, in *PeerTarget, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/scheduler.Scheduler/LeaveTask", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *schedulerClient) StatTask(ctx context.Context, in *StatTaskRequest, opts ...grpc.CallOption) (*Task, error) { out := new(Task) err := c.cc.Invoke(ctx, "/scheduler.Scheduler/StatTask", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *schedulerClient) AnnounceTask(ctx context.Context, in *AnnounceTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/scheduler.Scheduler/AnnounceTask", in, out, opts...) if err != nil { return nil, err } return out, nil } // SchedulerServer is the server API for Scheduler service. type SchedulerServer interface { // RegisterPeerTask registers a peer into task. RegisterPeerTask(context.Context, *PeerTaskRequest) (*RegisterResult, error) // ReportPieceResult reports piece results and receives peer packets. ReportPieceResult(Scheduler_ReportPieceResultServer) error // ReportPeerResult reports downloading result for the peer. ReportPeerResult(context.Context, *PeerResult) (*emptypb.Empty, error) // LeaveTask makes the peer leaving from task. LeaveTask(context.Context, *PeerTarget) (*emptypb.Empty, error) // Checks if any peer has the given task. StatTask(context.Context, *StatTaskRequest) (*Task, error) // A peer announces that it has the announced task to other peers. AnnounceTask(context.Context, *AnnounceTaskRequest) (*emptypb.Empty, error) } // UnimplementedSchedulerServer can be embedded to have forward compatible implementations. type UnimplementedSchedulerServer struct { } func (*UnimplementedSchedulerServer) RegisterPeerTask(context.Context, *PeerTaskRequest) (*RegisterResult, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterPeerTask not implemented") } func (*UnimplementedSchedulerServer) ReportPieceResult(Scheduler_ReportPieceResultServer) error { return status.Errorf(codes.Unimplemented, "method ReportPieceResult not implemented") } func (*UnimplementedSchedulerServer) ReportPeerResult(context.Context, *PeerResult) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ReportPeerResult not implemented") } func (*UnimplementedSchedulerServer) LeaveTask(context.Context, *PeerTarget) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method LeaveTask not implemented") } func (*UnimplementedSchedulerServer) StatTask(context.Context, *StatTaskRequest) (*Task, error) { return nil, status.Errorf(codes.Unimplemented, "method StatTask not implemented") } func (*UnimplementedSchedulerServer) AnnounceTask(context.Context, *AnnounceTaskRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AnnounceTask not implemented") } func RegisterSchedulerServer(s *grpc.Server, srv SchedulerServer) { s.RegisterService(&_Scheduler_serviceDesc, srv) } func _Scheduler_RegisterPeerTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PeerTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SchedulerServer).RegisterPeerTask(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scheduler.Scheduler/RegisterPeerTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SchedulerServer).RegisterPeerTask(ctx, req.(*PeerTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Scheduler_ReportPieceResult_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(SchedulerServer).ReportPieceResult(&schedulerReportPieceResultServer{stream}) } type Scheduler_ReportPieceResultServer interface { Send(*PeerPacket) error Recv() (*PieceResult, error) grpc.ServerStream } type schedulerReportPieceResultServer struct { grpc.ServerStream } func (x *schedulerReportPieceResultServer) Send(m *PeerPacket) error { return x.ServerStream.SendMsg(m) } func (x *schedulerReportPieceResultServer) Recv() (*PieceResult, error) { m := new(PieceResult) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _Scheduler_ReportPeerResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PeerResult) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SchedulerServer).ReportPeerResult(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scheduler.Scheduler/ReportPeerResult", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SchedulerServer).ReportPeerResult(ctx, req.(*PeerResult)) } return interceptor(ctx, in, info, handler) } func _Scheduler_LeaveTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PeerTarget) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SchedulerServer).LeaveTask(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scheduler.Scheduler/LeaveTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SchedulerServer).LeaveTask(ctx, req.(*PeerTarget)) } return interceptor(ctx, in, info, handler) } func _Scheduler_StatTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StatTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SchedulerServer).StatTask(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scheduler.Scheduler/StatTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SchedulerServer).StatTask(ctx, req.(*StatTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Scheduler_AnnounceTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AnnounceTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SchedulerServer).AnnounceTask(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scheduler.Scheduler/AnnounceTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SchedulerServer).AnnounceTask(ctx, req.(*AnnounceTaskRequest)) } return interceptor(ctx, in, info, handler) } var _Scheduler_serviceDesc = grpc.ServiceDesc{ ServiceName: "scheduler.Scheduler", HandlerType: (*SchedulerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RegisterPeerTask", Handler: _Scheduler_RegisterPeerTask_Handler, }, { MethodName: "ReportPeerResult", Handler: _Scheduler_ReportPeerResult_Handler, }, { MethodName: "LeaveTask", Handler: _Scheduler_LeaveTask_Handler, }, { MethodName: "StatTask", Handler: _Scheduler_StatTask_Handler, }, { MethodName: "AnnounceTask", Handler: _Scheduler_AnnounceTask_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ReportPieceResult", Handler: _Scheduler_ReportPieceResult_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "pkg/apis/scheduler/v1/scheduler.proto", }