diff --git a/pkg/apis/common/v2/common.pb.go b/pkg/apis/common/v2/common.pb.go index b360149..a7f2ee5 100644 --- a/pkg/apis/common/v2/common.pb.go +++ b/pkg/apis/common/v2/common.pb.go @@ -639,20 +639,36 @@ type Host struct { // Host id. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Host ip. - Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` - // Peer hostname. + // Host type. + Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` + // Hostname. Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` + // Host ip. + Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"` // Port of grpc service. - Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` + Port int32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"` // Port of download server. - DownloadPort int32 `protobuf:"varint,5,opt,name=download_port,json=downloadPort,proto3" json:"download_port,omitempty"` - // Security domain for network. - SecurityDomain string `protobuf:"bytes,6,opt,name=security_domain,json=securityDomain,proto3" json:"security_domain,omitempty"` - // Host location, eg: 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"` + DownloadPort int32 `protobuf:"varint,6,opt,name=download_port,json=downloadPort,proto3" json:"download_port,omitempty"` + // Host OS. + Os string `protobuf:"bytes,7,opt,name=os,proto3" json:"os,omitempty"` + // Host platform. + Platform string `protobuf:"bytes,8,opt,name=platform,proto3" json:"platform,omitempty"` + // Host platform family. + PlatformFamily string `protobuf:"bytes,9,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"` + // Host platform version. + PlatformVersion string `protobuf:"bytes,10,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"` + // Host kernel version. + KernelVersion string `protobuf:"bytes,11,opt,name=kernel_version,json=kernelVersion,proto3" json:"kernel_version,omitempty"` + // CPU Stat. + Cpu *CPU `protobuf:"bytes,12,opt,name=cpu,proto3" json:"cpu,omitempty"` + // Memory Stat. + Memory *Memory `protobuf:"bytes,13,opt,name=memory,proto3" json:"memory,omitempty"` + // Network Stat. + Network *Network `protobuf:"bytes,14,opt,name=network,proto3" json:"network,omitempty"` + // Disk Stat. + Disk *Disk `protobuf:"bytes,15,opt,name=disk,proto3" json:"disk,omitempty"` + // Build information. + Build *Build `protobuf:"bytes,16,opt,name=build,proto3" json:"build,omitempty"` } func (x *Host) Reset() { @@ -694,11 +710,11 @@ func (x *Host) GetId() string { return "" } -func (x *Host) GetIp() string { +func (x *Host) GetType() uint32 { if x != nil { - return x.Ip + return x.Type } - return "" + return 0 } func (x *Host) GetHostname() string { @@ -708,6 +724,13 @@ func (x *Host) GetHostname() string { return "" } +func (x *Host) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + func (x *Host) GetPort() int32 { if x != nil { return x.Port @@ -722,41 +745,96 @@ func (x *Host) GetDownloadPort() int32 { return 0 } -func (x *Host) GetSecurityDomain() string { +func (x *Host) GetOs() string { if x != nil { - return x.SecurityDomain + return x.Os } return "" } -func (x *Host) GetLocation() string { +func (x *Host) GetPlatform() string { if x != nil { - return x.Location + return x.Platform } return "" } -func (x *Host) GetIdc() string { +func (x *Host) GetPlatformFamily() string { if x != nil { - return x.Idc + return x.PlatformFamily } return "" } -// Range represents download range. -type Range struct { +func (x *Host) GetPlatformVersion() string { + if x != nil { + return x.PlatformVersion + } + return "" +} + +func (x *Host) GetKernelVersion() string { + if x != nil { + return x.KernelVersion + } + return "" +} + +func (x *Host) GetCpu() *CPU { + if x != nil { + return x.Cpu + } + return nil +} + +func (x *Host) GetMemory() *Memory { + if x != nil { + return x.Memory + } + return nil +} + +func (x *Host) GetNetwork() *Network { + if x != nil { + return x.Network + } + return nil +} + +func (x *Host) GetDisk() *Disk { + if x != nil { + return x.Disk + } + return nil +} + +func (x *Host) GetBuild() *Build { + if x != nil { + return x.Build + } + return nil +} + +// CPU Stat. +type CPU struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Start of range. - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - // Length of range. - Length int64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` + // Number of logical cores in the system. + LogicalCount uint32 `protobuf:"varint,1,opt,name=logical_count,json=logicalCount,proto3" json:"logical_count,omitempty"` + // Number of physical cores in the system + PhysicalCount uint32 `protobuf:"varint,2,opt,name=physical_count,json=physicalCount,proto3" json:"physical_count,omitempty"` + // Percent calculates the percentage of cpu used. + Percent float64 `protobuf:"fixed64,3,opt,name=percent,proto3" json:"percent,omitempty"` + // Calculates the percentage of cpu used by process. + ProcessPercent float64 `protobuf:"fixed64,4,opt,name=process_percent,json=processPercent,proto3" json:"process_percent,omitempty"` + // CPUTimes contains the amounts of time the CPU has spent performing different kinds of work. + Times *CPUTimes `protobuf:"bytes,5,opt,name=times,proto3" json:"times,omitempty"` } -func (x *Range) Reset() { - *x = Range{} +func (x *CPU) Reset() { + *x = CPU{} if protoimpl.UnsafeEnabled { mi := &file_pkg_apis_common_v2_common_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -764,13 +842,13 @@ func (x *Range) Reset() { } } -func (x *Range) String() string { +func (x *CPU) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Range) ProtoMessage() {} +func (*CPU) ProtoMessage() {} -func (x *Range) ProtoReflect() protoreflect.Message { +func (x *CPU) ProtoReflect() protoreflect.Message { mi := &file_pkg_apis_common_v2_common_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -782,25 +860,544 @@ func (x *Range) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Range.ProtoReflect.Descriptor instead. -func (*Range) Descriptor() ([]byte, []int) { +// Deprecated: Use CPU.ProtoReflect.Descriptor instead. +func (*CPU) Descriptor() ([]byte, []int) { return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{3} } -func (x *Range) GetStart() int64 { +func (x *CPU) GetLogicalCount() uint32 { if x != nil { - return x.Start + return x.LogicalCount } return 0 } -func (x *Range) GetLength() int64 { +func (x *CPU) GetPhysicalCount() uint32 { if x != nil { - return x.Length + return x.PhysicalCount } return 0 } +func (x *CPU) GetPercent() float64 { + if x != nil { + return x.Percent + } + return 0 +} + +func (x *CPU) GetProcessPercent() float64 { + if x != nil { + return x.ProcessPercent + } + return 0 +} + +func (x *CPU) GetTimes() *CPUTimes { + if x != nil { + return x.Times + } + return nil +} + +// CPUTimes contains the amounts of time the CPU has spent performing different +// kinds of work. Time units are in seconds. +type CPUTimes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CPU time of user. + User float64 `protobuf:"fixed64,1,opt,name=user,proto3" json:"user,omitempty"` + // CPU time of system. + System float64 `protobuf:"fixed64,2,opt,name=system,proto3" json:"system,omitempty"` + // CPU time of idle. + Idle float64 `protobuf:"fixed64,3,opt,name=idle,proto3" json:"idle,omitempty"` + // CPU time of nice. + Nice float64 `protobuf:"fixed64,4,opt,name=nice,proto3" json:"nice,omitempty"` + // CPU time of iowait. + Iowait float64 `protobuf:"fixed64,5,opt,name=iowait,proto3" json:"iowait,omitempty"` + // CPU time of irq. + Irq float64 `protobuf:"fixed64,6,opt,name=irq,proto3" json:"irq,omitempty"` + // CPU time of softirq. + Softirq float64 `protobuf:"fixed64,7,opt,name=softirq,proto3" json:"softirq,omitempty"` + // CPU time of steal. + Steal float64 `protobuf:"fixed64,8,opt,name=steal,proto3" json:"steal,omitempty"` + // CPU time of guest. + Guest float64 `protobuf:"fixed64,9,opt,name=guest,proto3" json:"guest,omitempty"` + // CPU time of guest nice. + GuestNice float64 `protobuf:"fixed64,10,opt,name=guest_nice,json=guestNice,proto3" json:"guest_nice,omitempty"` +} + +func (x *CPUTimes) Reset() { + *x = CPUTimes{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CPUTimes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CPUTimes) ProtoMessage() {} + +func (x *CPUTimes) ProtoReflect() protoreflect.Message { + mi := &file_pkg_apis_common_v2_common_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 CPUTimes.ProtoReflect.Descriptor instead. +func (*CPUTimes) Descriptor() ([]byte, []int) { + return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{4} +} + +func (x *CPUTimes) GetUser() float64 { + if x != nil { + return x.User + } + return 0 +} + +func (x *CPUTimes) GetSystem() float64 { + if x != nil { + return x.System + } + return 0 +} + +func (x *CPUTimes) GetIdle() float64 { + if x != nil { + return x.Idle + } + return 0 +} + +func (x *CPUTimes) GetNice() float64 { + if x != nil { + return x.Nice + } + return 0 +} + +func (x *CPUTimes) GetIowait() float64 { + if x != nil { + return x.Iowait + } + return 0 +} + +func (x *CPUTimes) GetIrq() float64 { + if x != nil { + return x.Irq + } + return 0 +} + +func (x *CPUTimes) GetSoftirq() float64 { + if x != nil { + return x.Softirq + } + return 0 +} + +func (x *CPUTimes) GetSteal() float64 { + if x != nil { + return x.Steal + } + return 0 +} + +func (x *CPUTimes) GetGuest() float64 { + if x != nil { + return x.Guest + } + return 0 +} + +func (x *CPUTimes) GetGuestNice() float64 { + if x != nil { + return x.GuestNice + } + return 0 +} + +// Memory Stat. +type Memory struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Total amount of RAM on this system. + Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + // RAM available for programs to allocate. + Available uint64 `protobuf:"varint,2,opt,name=available,proto3" json:"available,omitempty"` + // RAM used by programs. + Used uint64 `protobuf:"varint,3,opt,name=used,proto3" json:"used,omitempty"` + // Percentage of RAM used by programs. + UsedPercent float64 `protobuf:"fixed64,4,opt,name=used_percent,json=usedPercent,proto3" json:"used_percent,omitempty"` + // Calculates the percentage of memory used by process. + ProcessUsedPercent float64 `protobuf:"fixed64,5,opt,name=process_used_percent,json=processUsedPercent,proto3" json:"process_used_percent,omitempty"` + // This is the kernel's notion of free memory. + Free uint64 `protobuf:"varint,6,opt,name=free,proto3" json:"free,omitempty"` +} + +func (x *Memory) Reset() { + *x = Memory{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Memory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Memory) ProtoMessage() {} + +func (x *Memory) ProtoReflect() protoreflect.Message { + mi := &file_pkg_apis_common_v2_common_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 Memory.ProtoReflect.Descriptor instead. +func (*Memory) Descriptor() ([]byte, []int) { + return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{5} +} + +func (x *Memory) GetTotal() uint64 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *Memory) GetAvailable() uint64 { + if x != nil { + return x.Available + } + return 0 +} + +func (x *Memory) GetUsed() uint64 { + if x != nil { + return x.Used + } + return 0 +} + +func (x *Memory) GetUsedPercent() float64 { + if x != nil { + return x.UsedPercent + } + return 0 +} + +func (x *Memory) GetProcessUsedPercent() float64 { + if x != nil { + return x.ProcessUsedPercent + } + return 0 +} + +func (x *Memory) GetFree() uint64 { + if x != nil { + return x.Free + } + return 0 +} + +// Network Stat. +type Network struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Return count of tcp connections opened and status is ESTABLISHED. + TcpConnectionCount uint32 `protobuf:"varint,1,opt,name=tcp_connection_count,json=tcpConnectionCount,proto3" json:"tcp_connection_count,omitempty"` + // Return count of upload tcp connections opened and status is ESTABLISHED. + UploadTcpConnectionCount uint32 `protobuf:"varint,2,opt,name=upload_tcp_connection_count,json=uploadTcpConnectionCount,proto3" json:"upload_tcp_connection_count,omitempty"` + // Security domain for network. + SecurityDomain string `protobuf:"bytes,3,opt,name=security_domain,json=securityDomain,proto3" json:"security_domain,omitempty"` + // Location path(area|country|province|city|...). + Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` + // IDC where the peer host is located + Idc string `protobuf:"bytes,5,opt,name=idc,proto3" json:"idc,omitempty"` +} + +func (x *Network) Reset() { + *x = Network{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Network) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Network) ProtoMessage() {} + +func (x *Network) ProtoReflect() protoreflect.Message { + mi := &file_pkg_apis_common_v2_common_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 Network.ProtoReflect.Descriptor instead. +func (*Network) Descriptor() ([]byte, []int) { + return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{6} +} + +func (x *Network) GetTcpConnectionCount() uint32 { + if x != nil { + return x.TcpConnectionCount + } + return 0 +} + +func (x *Network) GetUploadTcpConnectionCount() uint32 { + if x != nil { + return x.UploadTcpConnectionCount + } + return 0 +} + +func (x *Network) GetSecurityDomain() string { + if x != nil { + return x.SecurityDomain + } + return "" +} + +func (x *Network) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *Network) GetIdc() string { + if x != nil { + return x.Idc + } + return "" +} + +// Disk Stat. +type Disk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Total amount of disk on the data path of dragonfly. + Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + // Free amount of disk on the data path of dragonfly. + Free uint64 `protobuf:"varint,2,opt,name=free,proto3" json:"free,omitempty"` + // Used amount of disk on the data path of dragonfly. + Used uint64 `protobuf:"varint,3,opt,name=used,proto3" json:"used,omitempty"` + // Used percent of disk on the data path of dragonfly directory. + UsedPercent float64 `protobuf:"fixed64,4,opt,name=used_percent,json=usedPercent,proto3" json:"used_percent,omitempty"` + // Total amount of indoes on the data path of dragonfly directory. + InodesTotal uint64 `protobuf:"varint,5,opt,name=inodes_total,json=inodesTotal,proto3" json:"inodes_total,omitempty"` + // Used amount of indoes on the data path of dragonfly directory. + InodesUsed uint64 `protobuf:"varint,6,opt,name=inodes_used,json=inodesUsed,proto3" json:"inodes_used,omitempty"` + // Free amount of indoes on the data path of dragonfly directory. + InodesFree uint64 `protobuf:"varint,7,opt,name=inodes_free,json=inodesFree,proto3" json:"inodes_free,omitempty"` + // Used percent of indoes on the data path of dragonfly directory. + InodesUsedPercent float64 `protobuf:"fixed64,8,opt,name=inodes_used_percent,json=inodesUsedPercent,proto3" json:"inodes_used_percent,omitempty"` +} + +func (x *Disk) Reset() { + *x = Disk{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Disk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Disk) ProtoMessage() {} + +func (x *Disk) ProtoReflect() protoreflect.Message { + mi := &file_pkg_apis_common_v2_common_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 Disk.ProtoReflect.Descriptor instead. +func (*Disk) Descriptor() ([]byte, []int) { + return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{7} +} + +func (x *Disk) GetTotal() uint64 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *Disk) GetFree() uint64 { + if x != nil { + return x.Free + } + return 0 +} + +func (x *Disk) GetUsed() uint64 { + if x != nil { + return x.Used + } + return 0 +} + +func (x *Disk) GetUsedPercent() float64 { + if x != nil { + return x.UsedPercent + } + return 0 +} + +func (x *Disk) GetInodesTotal() uint64 { + if x != nil { + return x.InodesTotal + } + return 0 +} + +func (x *Disk) GetInodesUsed() uint64 { + if x != nil { + return x.InodesUsed + } + return 0 +} + +func (x *Disk) GetInodesFree() uint64 { + if x != nil { + return x.InodesFree + } + return 0 +} + +func (x *Disk) GetInodesUsedPercent() float64 { + if x != nil { + return x.InodesUsedPercent + } + return 0 +} + +// Build information. +type Build struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Git version. + GitVersion string `protobuf:"bytes,1,opt,name=git_version,json=gitVersion,proto3" json:"git_version,omitempty"` + // Git commit. + GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` + // Golang version. + GoVersion string `protobuf:"bytes,3,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` + // Build platform. + Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"` +} + +func (x *Build) Reset() { + *x = Build{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Build) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Build) ProtoMessage() {} + +func (x *Build) ProtoReflect() protoreflect.Message { + mi := &file_pkg_apis_common_v2_common_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 Build.ProtoReflect.Descriptor instead. +func (*Build) Descriptor() ([]byte, []int) { + return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{8} +} + +func (x *Build) GetGitVersion() string { + if x != nil { + return x.GitVersion + } + return "" +} + +func (x *Build) GetGitCommit() string { + if x != nil { + return x.GitCommit + } + return "" +} + +func (x *Build) GetGoVersion() string { + if x != nil { + return x.GoVersion + } + return "" +} + +func (x *Build) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + // Download information. type Download struct { state protoimpl.MessageState @@ -840,7 +1437,7 @@ type Download struct { func (x *Download) Reset() { *x = Download{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_common_v2_common_proto_msgTypes[4] + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -853,7 +1450,7 @@ func (x *Download) String() string { func (*Download) ProtoMessage() {} func (x *Download) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_common_v2_common_proto_msgTypes[4] + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -866,7 +1463,7 @@ func (x *Download) ProtoReflect() protoreflect.Message { // Deprecated: Use Download.ProtoReflect.Descriptor instead. func (*Download) Descriptor() ([]byte, []int) { - return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{4} + return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{9} } func (x *Download) GetUrl() string { @@ -967,6 +1564,64 @@ func (x *Download) GetNeedBackToSource() bool { return false } +// Range represents download range. +type Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Start of range. + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + // Length of range. + Length int64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` +} + +func (x *Range) Reset() { + *x = Range{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Range) ProtoMessage() {} + +func (x *Range) ProtoReflect() protoreflect.Message { + mi := &file_pkg_apis_common_v2_common_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 Range.ProtoReflect.Descriptor instead. +func (*Range) Descriptor() ([]byte, []int) { + return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{10} +} + +func (x *Range) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Range) GetLength() int64 { + if x != nil { + return x.Length + } + return 0 +} + // Piece represents information of piece. type Piece struct { state protoimpl.MessageState @@ -994,7 +1649,7 @@ type Piece struct { func (x *Piece) Reset() { *x = Piece{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_common_v2_common_proto_msgTypes[5] + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1007,7 +1662,7 @@ func (x *Piece) String() string { func (*Piece) ProtoMessage() {} func (x *Piece) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_common_v2_common_proto_msgTypes[5] + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1020,7 +1675,7 @@ func (x *Piece) ProtoReflect() protoreflect.Message { // Deprecated: Use Piece.ProtoReflect.Descriptor instead. func (*Piece) Descriptor() ([]byte, []int) { - return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{5} + return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{11} } func (x *Piece) GetNumber() int32 { @@ -1096,7 +1751,7 @@ type ExtendAttribute struct { func (x *ExtendAttribute) Reset() { *x = ExtendAttribute{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_common_v2_common_proto_msgTypes[6] + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1109,7 +1764,7 @@ func (x *ExtendAttribute) String() string { func (*ExtendAttribute) ProtoMessage() {} func (x *ExtendAttribute) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_common_v2_common_proto_msgTypes[6] + mi := &file_pkg_apis_common_v2_common_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1122,7 +1777,7 @@ func (x *ExtendAttribute) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtendAttribute.ProtoReflect.Descriptor instead. func (*ExtendAttribute) Descriptor() ([]byte, []int) { - return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{6} + return file_pkg_apis_common_v2_common_proto_rawDescGZIP(), []int{12} } func (x *ExtendAttribute) GetHeader() map[string]string { @@ -1245,134 +1900,251 @@ var file_pkg_apis_common_v2_common_proto_rawDesc = []byte{ 0x64, 0x41, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xad, - 0x02, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf0, + 0x04, 0x0a, 0x04, 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, 0x10, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x23, 0x0a, 0x08, 0x68, 0x6f, 0x73, - 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, - 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x31, 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, - 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, - 0x6f, 0x72, 0x74, 0x12, 0x33, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, - 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, - 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1c, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, - 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x03, 0x69, 0x64, 0x63, 0x22, 0x35, - 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc6, 0x05, 0x0a, 0x08, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 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, 0x3f, - 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, - 0xfa, 0x42, 0x24, 0x72, 0x22, 0x32, 0x1d, 0x5e, 0x28, 0x6d, 0x64, 0x35, 0x29, 0x7c, 0x28, 0x73, - 0x68, 0x61, 0x32, 0x35, 0x36, 0x29, 0x3a, 0x5b, 0x41, 0x2d, 0x46, 0x61, 0x2d, 0x66, 0x30, 0x2d, - 0x39, 0x5d, 0x2b, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, - 0x26, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, - 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, - 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x20, 0x0a, 0x0b, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, - 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, - 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x0c, - 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x69, 0x65, - 0x63, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, - 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x0c, 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, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3e, 0x0a, 0x13, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6e, 0x65, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x63, - 0x6b, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x10, 0x6e, 0x65, 0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x54, 0x6f, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8d, - 0x03, 0x0a, 0x05, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, - 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, - 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x00, 0x52, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x32, 0x1d, 0x5e, 0x28, 0x6d, - 0x64, 0x35, 0x29, 0x7c, 0x28, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x29, 0x3a, 0x5b, 0x41, 0x2d, - 0x46, 0x61, 0x2d, 0x66, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x64, - 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x07, 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, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, - 0x02, 0x08, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xb2, 0x01, - 0x02, 0x08, 0x01, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xda, - 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x1a, 0x05, 0x10, 0xd7, - 0x04, 0x28, 0x64, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, - 0x1f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x43, 0x0a, 0x09, 0x53, - 0x69, 0x7a, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, - 0x41, 0x4c, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, - 0x08, 0x0a, 0x04, 0x54, 0x49, 0x4e, 0x59, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, - 0x54, 0x59, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x10, 0x04, - 0x2a, 0x32, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, - 0x44, 0x46, 0x44, 0x41, 0x45, 0x4d, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x46, - 0x43, 0x41, 0x43, 0x48, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x46, 0x53, 0x54, 0x4f, - 0x52, 0x45, 0x10, 0x02, 0x2a, 0x42, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x54, 0x4f, 0x5f, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x4d, 0x4f, 0x54, - 0x45, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x43, 0x41, - 0x4c, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x5e, 0x0a, 0x08, 0x50, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x30, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x31, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x32, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, - 0x4c, 0x33, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x34, 0x10, 0x04, - 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x35, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, - 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x36, 0x10, 0x06, 0x42, 0x26, 0x5a, 0x24, 0x64, 0x37, 0x79, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x1b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, + 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, + 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, + 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, + 0x80, 0x08, 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x27, 0x0a, 0x0f, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x46, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x25, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x50, 0x55, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x03, + 0x63, 0x70, 0x75, 0x12, 0x33, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, + 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12, + 0x30, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x22, 0xfb, 0x01, 0x0a, 0x03, 0x43, 0x50, 0x55, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, + 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, + 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, + 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x22, + 0x8d, 0x03, 0x0a, 0x08, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, + 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x12, 0x26, 0x0a, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, + 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x52, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x04, + 0x6e, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, + 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x65, + 0x12, 0x26, 0x0a, 0x06, 0x69, 0x6f, 0x77, 0x61, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, + 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x52, 0x06, 0x69, 0x6f, 0x77, 0x61, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x69, 0x72, 0x71, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x69, 0x72, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x6f, + 0x66, 0x74, 0x69, 0x72, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, + 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x73, 0x6f, 0x66, + 0x74, 0x69, 0x72, 0x71, 0x12, 0x24, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x52, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x75, + 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x67, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2d, 0x0a, 0x0a, 0x67, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x69, 0x63, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x52, 0x09, 0x67, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x69, 0x63, 0x65, 0x22, + 0xeb, 0x01, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, + 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x49, + 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, + 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, 0x73, + 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x22, 0xd1, 0x01, + 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x63, 0x70, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x74, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x75, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x18, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x10, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, + 0x63, 0x22, 0xae, 0x02, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x66, 0x72, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, + 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, + 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, + 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, + 0x6f, 0x64, 0x65, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x47, 0x0a, 0x13, 0x69, 0x6e, 0x6f, + 0x64, 0x65, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, + 0x11, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x67, 0x69, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x67, 0x69, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, + 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0xc6, 0x05, 0x0a, 0x08, 0x44, 0x6f, 0x77, 0x6e, + 0x6c, 0x6f, 0x61, 0x64, 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, 0x3f, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x32, 0x1d, 0x5e, 0x28, 0x6d, 0x64, 0x35, 0x29, 0x7c, + 0x28, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x29, 0x3a, 0x5b, 0x41, 0x2d, 0x46, 0x61, 0x2d, 0x66, + 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x12, 0x26, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x74, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x20, + 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x39, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x50, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2a, + 0x0a, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x0b, 0x70, + 0x69, 0x65, 0x63, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x0b, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x0a, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x0c, 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, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3e, 0x0a, 0x13, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x52, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6e, 0x65, 0x65, 0x64, 0x5f, 0x62, + 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x6e, 0x65, 0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x54, 0x6f, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x35, 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x8d, 0x03, 0x0a, 0x05, 0x50, 0x69, 0x65, 0x63, + 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xd0, 0x01, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x32, 0x02, 0x28, 0x00, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3f, 0x0a, + 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, + 0x42, 0x24, 0x72, 0x22, 0x32, 0x1d, 0x5e, 0x28, 0x6d, 0x64, 0x35, 0x29, 0x7c, 0x28, 0x73, 0x68, + 0x61, 0x32, 0x35, 0x36, 0x29, 0x3a, 0x5b, 0x41, 0x2d, 0x46, 0x61, 0x2d, 0x66, 0x30, 0x2d, 0x39, + 0x5d, 0x2b, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x39, + 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, + 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x73, + 0x74, 0x18, 0x07, 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, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x63, 0x6f, + 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xb2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xda, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x0b, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x1a, 0x05, 0x10, 0xd7, 0x04, 0x28, 0x64, 0x52, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x43, 0x0a, 0x09, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x49, 0x4e, 0x59, + 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x03, 0x12, 0x0a, 0x0a, + 0x06, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x10, 0x04, 0x2a, 0x32, 0x0a, 0x08, 0x54, 0x61, 0x73, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x46, 0x44, 0x41, 0x45, 0x4d, 0x4f, + 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x46, 0x43, 0x41, 0x43, 0x48, 0x45, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x46, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x10, 0x02, 0x2a, 0x42, 0x0a, + 0x0b, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, + 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x00, + 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x10, + 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x10, + 0x02, 0x2a, 0x5e, 0x0a, 0x08, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0a, 0x0a, + 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x30, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, + 0x45, 0x4c, 0x31, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x32, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x33, 0x10, 0x03, 0x12, 0x0a, 0x0a, + 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, + 0x45, 0x4c, 0x35, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x36, 0x10, + 0x06, 0x42, 0x26, 0x5a, 0x24, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x32, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1388,7 +2160,7 @@ func file_pkg_apis_common_v2_common_proto_rawDescGZIP() []byte { } var file_pkg_apis_common_v2_common_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_pkg_apis_common_v2_common_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_pkg_apis_common_v2_common_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_pkg_apis_common_v2_common_proto_goTypes = []interface{}{ (SizeScope)(0), // 0: common.v2.SizeScope (TaskType)(0), // 1: common.v2.TaskType @@ -1397,45 +2169,57 @@ var file_pkg_apis_common_v2_common_proto_goTypes = []interface{}{ (*Peer)(nil), // 4: common.v2.Peer (*Task)(nil), // 5: common.v2.Task (*Host)(nil), // 6: common.v2.Host - (*Range)(nil), // 7: common.v2.Range - (*Download)(nil), // 8: common.v2.Download - (*Piece)(nil), // 9: common.v2.Piece - (*ExtendAttribute)(nil), // 10: common.v2.ExtendAttribute - nil, // 11: common.v2.Task.HeaderEntry - nil, // 12: common.v2.Download.HeaderEntry - nil, // 13: common.v2.ExtendAttribute.HeaderEntry - (*durationpb.Duration)(nil), // 14: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*CPU)(nil), // 7: common.v2.CPU + (*CPUTimes)(nil), // 8: common.v2.CPUTimes + (*Memory)(nil), // 9: common.v2.Memory + (*Network)(nil), // 10: common.v2.Network + (*Disk)(nil), // 11: common.v2.Disk + (*Build)(nil), // 12: common.v2.Build + (*Download)(nil), // 13: common.v2.Download + (*Range)(nil), // 14: common.v2.Range + (*Piece)(nil), // 15: common.v2.Piece + (*ExtendAttribute)(nil), // 16: common.v2.ExtendAttribute + nil, // 17: common.v2.Task.HeaderEntry + nil, // 18: common.v2.Download.HeaderEntry + nil, // 19: common.v2.ExtendAttribute.HeaderEntry + (*durationpb.Duration)(nil), // 20: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp } var file_pkg_apis_common_v2_common_proto_depIdxs = []int32{ - 7, // 0: common.v2.Peer.range:type_name -> common.v2.Range + 14, // 0: common.v2.Peer.range:type_name -> common.v2.Range 3, // 1: common.v2.Peer.priority:type_name -> common.v2.Priority - 9, // 2: common.v2.Peer.pieces:type_name -> common.v2.Piece - 14, // 3: common.v2.Peer.cost:type_name -> google.protobuf.Duration + 15, // 2: common.v2.Peer.pieces:type_name -> common.v2.Piece + 20, // 3: common.v2.Peer.cost:type_name -> google.protobuf.Duration 5, // 4: common.v2.Peer.task:type_name -> common.v2.Task 6, // 5: common.v2.Peer.host:type_name -> common.v2.Host - 15, // 6: common.v2.Peer.created_at:type_name -> google.protobuf.Timestamp - 15, // 7: common.v2.Peer.updated_at:type_name -> google.protobuf.Timestamp + 21, // 6: common.v2.Peer.created_at:type_name -> google.protobuf.Timestamp + 21, // 7: common.v2.Peer.updated_at:type_name -> google.protobuf.Timestamp 1, // 8: common.v2.Task.type:type_name -> common.v2.TaskType - 11, // 9: common.v2.Task.header:type_name -> common.v2.Task.HeaderEntry + 17, // 9: common.v2.Task.header:type_name -> common.v2.Task.HeaderEntry 0, // 10: common.v2.Task.size_scope:type_name -> common.v2.SizeScope - 9, // 11: common.v2.Task.pieces:type_name -> common.v2.Piece - 15, // 12: common.v2.Task.created_at:type_name -> google.protobuf.Timestamp - 15, // 13: common.v2.Task.updated_at:type_name -> google.protobuf.Timestamp - 7, // 14: common.v2.Download.range:type_name -> common.v2.Range - 1, // 15: common.v2.Download.type:type_name -> common.v2.TaskType - 3, // 16: common.v2.Download.priority:type_name -> common.v2.Priority - 12, // 17: common.v2.Download.header:type_name -> common.v2.Download.HeaderEntry - 14, // 18: common.v2.Download.timeout:type_name -> google.protobuf.Duration - 2, // 19: common.v2.Piece.traffic_type:type_name -> common.v2.TrafficType - 14, // 20: common.v2.Piece.cost:type_name -> google.protobuf.Duration - 15, // 21: common.v2.Piece.created_at:type_name -> google.protobuf.Timestamp - 13, // 22: common.v2.ExtendAttribute.header:type_name -> common.v2.ExtendAttribute.HeaderEntry - 23, // [23:23] is the sub-list for method output_type - 23, // [23:23] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name + 15, // 11: common.v2.Task.pieces:type_name -> common.v2.Piece + 21, // 12: common.v2.Task.created_at:type_name -> google.protobuf.Timestamp + 21, // 13: common.v2.Task.updated_at:type_name -> google.protobuf.Timestamp + 7, // 14: common.v2.Host.cpu:type_name -> common.v2.CPU + 9, // 15: common.v2.Host.memory:type_name -> common.v2.Memory + 10, // 16: common.v2.Host.network:type_name -> common.v2.Network + 11, // 17: common.v2.Host.disk:type_name -> common.v2.Disk + 12, // 18: common.v2.Host.build:type_name -> common.v2.Build + 8, // 19: common.v2.CPU.times:type_name -> common.v2.CPUTimes + 14, // 20: common.v2.Download.range:type_name -> common.v2.Range + 1, // 21: common.v2.Download.type:type_name -> common.v2.TaskType + 3, // 22: common.v2.Download.priority:type_name -> common.v2.Priority + 18, // 23: common.v2.Download.header:type_name -> common.v2.Download.HeaderEntry + 20, // 24: common.v2.Download.timeout:type_name -> google.protobuf.Duration + 2, // 25: common.v2.Piece.traffic_type:type_name -> common.v2.TrafficType + 20, // 26: common.v2.Piece.cost:type_name -> google.protobuf.Duration + 21, // 27: common.v2.Piece.created_at:type_name -> google.protobuf.Timestamp + 19, // 28: common.v2.ExtendAttribute.header:type_name -> common.v2.ExtendAttribute.HeaderEntry + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_pkg_apis_common_v2_common_proto_init() } @@ -1481,7 +2265,7 @@ func file_pkg_apis_common_v2_common_proto_init() { } } file_pkg_apis_common_v2_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Range); i { + switch v := v.(*CPU); i { case 0: return &v.state case 1: @@ -1493,7 +2277,7 @@ func file_pkg_apis_common_v2_common_proto_init() { } } file_pkg_apis_common_v2_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Download); i { + switch v := v.(*CPUTimes); i { case 0: return &v.state case 1: @@ -1505,7 +2289,7 @@ func file_pkg_apis_common_v2_common_proto_init() { } } file_pkg_apis_common_v2_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Piece); i { + switch v := v.(*Memory); i { case 0: return &v.state case 1: @@ -1517,6 +2301,78 @@ func file_pkg_apis_common_v2_common_proto_init() { } } file_pkg_apis_common_v2_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Network); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_apis_common_v2_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Disk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_apis_common_v2_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Build); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_apis_common_v2_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Download); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_apis_common_v2_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_apis_common_v2_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Piece); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_apis_common_v2_common_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtendAttribute); i { case 0: return &v.state @@ -1535,7 +2391,7 @@ func file_pkg_apis_common_v2_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_common_v2_common_proto_rawDesc, NumEnums: 4, - NumMessages: 10, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/apis/common/v2/common.pb.validate.go b/pkg/apis/common/v2/common.pb.validate.go index afc9e7a..5a26b7f 100644 --- a/pkg/apis/common/v2/common.pb.validate.go +++ b/pkg/apis/common/v2/common.pb.validate.go @@ -685,9 +685,20 @@ func (m *Host) validate(all bool) error { errors = append(errors, err) } - if utf8.RuneCountInString(m.GetIp()) < 1 { + if m.GetType() > 3 { err := HostValidationError{ - field: "Ip", + field: "Type", + reason: "value must be less than or equal to 3", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetHostname()) < 1 { + err := HostValidationError{ + field: "Hostname", reason: "value length must be at least 1 runes", } if !all { @@ -696,11 +707,10 @@ func (m *Host) validate(all bool) error { errors = append(errors, err) } - if err := m._validateHostname(m.GetHostname()); err != nil { - err = HostValidationError{ - field: "Hostname", - reason: "value must be a valid hostname", - cause: err, + if ip := net.ParseIP(m.GetIp()); ip == nil { + err := HostValidationError{ + field: "Ip", + reason: "value must be a valid IP address", } if !all { return err @@ -730,49 +740,214 @@ func (m *Host) validate(all bool) error { errors = append(errors, err) } - if m.GetSecurityDomain() != "" { + // no validation rules for Os - if utf8.RuneCountInString(m.GetSecurityDomain()) < 1 { - err := HostValidationError{ - field: "SecurityDomain", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) + // no validation rules for Platform + + // no validation rules for PlatformFamily + + // no validation rules for PlatformVersion + + // no validation rules for KernelVersion + + if m.GetCpu() == nil { + err := HostValidationError{ + field: "Cpu", + reason: "value is required", } - + if !all { + return err + } + errors = append(errors, err) } - if m.GetLocation() != "" { - - if utf8.RuneCountInString(m.GetLocation()) < 1 { - err := HostValidationError{ - field: "Location", - reason: "value length must be at least 1 runes", + if all { + switch v := interface{}(m.GetCpu()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostValidationError{ + field: "Cpu", + reason: "embedded message failed validation", + cause: err, + }) } - if !all { - return err + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostValidationError{ + field: "Cpu", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCpu()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostValidationError{ + field: "Cpu", + reason: "embedded message failed validation", + cause: err, } - errors = append(errors, err) } - } - if m.GetIdc() != "" { - - if utf8.RuneCountInString(m.GetIdc()) < 1 { - err := HostValidationError{ - field: "Idc", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) + if m.GetMemory() == nil { + err := HostValidationError{ + field: "Memory", + reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + } + if all { + switch v := interface{}(m.GetMemory()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostValidationError{ + field: "Memory", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostValidationError{ + field: "Memory", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMemory()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostValidationError{ + field: "Memory", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetNetwork() == nil { + err := HostValidationError{ + field: "Network", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetNetwork()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostValidationError{ + field: "Network", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostValidationError{ + field: "Network", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNetwork()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostValidationError{ + field: "Network", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetDisk() == nil { + err := HostValidationError{ + field: "Disk", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetDisk()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostValidationError{ + field: "Disk", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostValidationError{ + field: "Disk", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDisk()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostValidationError{ + field: "Disk", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetBuild() == nil { + err := HostValidationError{ + field: "Build", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBuild()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostValidationError{ + field: "Build", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostValidationError{ + field: "Build", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBuild()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostValidationError{ + field: "Build", + reason: "embedded message failed validation", + cause: err, + } + } } if len(errors) > 0 { @@ -782,36 +957,6 @@ func (m *Host) validate(all bool) error { return nil } -func (m *Host) _validateHostname(host string) error { - s := strings.ToLower(strings.TrimSuffix(host, ".")) - - if len(host) > 253 { - return errors.New("hostname cannot exceed 253 characters") - } - - for _, part := range strings.Split(s, ".") { - if l := len(part); l == 0 || l > 63 { - return errors.New("hostname part must be non-empty and cannot exceed 63 characters") - } - - if part[0] == '-' { - return errors.New("hostname parts cannot begin with hyphens") - } - - if part[len(part)-1] == '-' { - return errors.New("hostname parts cannot end with hyphens") - } - - for _, r := range part { - if (r < 'a' || r > 'z') && (r < '0' || r > '9') && r != '-' { - return fmt.Errorf("hostname parts can only contain alphanumeric characters or hyphens, got %q", string(r)) - } - } - } - - return nil -} - // HostMultiError is an error wrapping multiple validation errors returned by // Host.ValidateAll() if the designated constraints aren't met. type HostMultiError []error @@ -882,44 +1027,106 @@ var _ interface { ErrorName() string } = HostValidationError{} -// Validate checks the field values on Range 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 *Range) Validate() error { +// Validate checks the field values on CPU 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 *CPU) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on Range with the rules defined in the +// ValidateAll checks the field values on CPU 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 RangeMultiError, or nil if none found. -func (m *Range) ValidateAll() error { +// a list of violation errors wrapped in CPUMultiError, or nil if none found. +func (m *CPU) ValidateAll() error { return m.validate(true) } -func (m *Range) validate(all bool) error { +func (m *CPU) validate(all bool) error { if m == nil { return nil } var errors []error - // no validation rules for Start + // no validation rules for LogicalCount - // no validation rules for Length + // no validation rules for PhysicalCount + + if val := m.GetPercent(); val < 0 || val > 100 { + err := CPUValidationError{ + field: "Percent", + reason: "value must be inside range [0, 100]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if val := m.GetProcessPercent(); val < 0 || val > 100 { + err := CPUValidationError{ + field: "ProcessPercent", + reason: "value must be inside range [0, 100]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetTimes() == nil { + err := CPUValidationError{ + field: "Times", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTimes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CPUValidationError{ + field: "Times", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CPUValidationError{ + field: "Times", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CPUValidationError{ + field: "Times", + reason: "embedded message failed validation", + cause: err, + } + } + } if len(errors) > 0 { - return RangeMultiError(errors) + return CPUMultiError(errors) } return nil } -// RangeMultiError is an error wrapping multiple validation errors returned by -// Range.ValidateAll() if the designated constraints aren't met. -type RangeMultiError []error +// CPUMultiError is an error wrapping multiple validation errors returned by +// CPU.ValidateAll() if the designated constraints aren't met. +type CPUMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m RangeMultiError) Error() string { +func (m CPUMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -928,11 +1135,11 @@ func (m RangeMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m RangeMultiError) AllErrors() []error { return m } +func (m CPUMultiError) AllErrors() []error { return m } -// RangeValidationError is the validation error returned by Range.Validate if -// the designated constraints aren't met. -type RangeValidationError struct { +// CPUValidationError is the validation error returned by CPU.Validate if the +// designated constraints aren't met. +type CPUValidationError struct { field string reason string cause error @@ -940,22 +1147,22 @@ type RangeValidationError struct { } // Field function returns field value. -func (e RangeValidationError) Field() string { return e.field } +func (e CPUValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RangeValidationError) Reason() string { return e.reason } +func (e CPUValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RangeValidationError) Cause() error { return e.cause } +func (e CPUValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RangeValidationError) Key() bool { return e.key } +func (e CPUValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RangeValidationError) ErrorName() string { return "RangeValidationError" } +func (e CPUValidationError) ErrorName() string { return "CPUValidationError" } // Error satisfies the builtin error interface -func (e RangeValidationError) Error() string { +func (e CPUValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -967,14 +1174,14 @@ func (e RangeValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRange.%s: %s%s", + "invalid %sCPU.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RangeValidationError{} +var _ error = CPUValidationError{} var _ interface { Field() string @@ -982,7 +1189,690 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RangeValidationError{} +} = CPUValidationError{} + +// Validate checks the field values on CPUTimes 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 *CPUTimes) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CPUTimes 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 CPUTimesMultiError, or nil +// if none found. +func (m *CPUTimes) ValidateAll() error { + return m.validate(true) +} + +func (m *CPUTimes) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetUser() < 0 { + err := CPUTimesValidationError{ + field: "User", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetSystem() < 0 { + err := CPUTimesValidationError{ + field: "System", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetIdle() < 0 { + err := CPUTimesValidationError{ + field: "Idle", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetNice() < 0 { + err := CPUTimesValidationError{ + field: "Nice", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetIowait() < 0 { + err := CPUTimesValidationError{ + field: "Iowait", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetIrq() < 0 { + err := CPUTimesValidationError{ + field: "Irq", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetSoftirq() < 0 { + err := CPUTimesValidationError{ + field: "Softirq", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetSteal() < 0 { + err := CPUTimesValidationError{ + field: "Steal", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetGuest() < 0 { + err := CPUTimesValidationError{ + field: "Guest", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetGuestNice() < 0 { + err := CPUTimesValidationError{ + field: "GuestNice", + reason: "value must be greater than or equal to 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return CPUTimesMultiError(errors) + } + + return nil +} + +// CPUTimesMultiError is an error wrapping multiple validation errors returned +// by CPUTimes.ValidateAll() if the designated constraints aren't met. +type CPUTimesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CPUTimesMultiError) 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 CPUTimesMultiError) AllErrors() []error { return m } + +// CPUTimesValidationError is the validation error returned by +// CPUTimes.Validate if the designated constraints aren't met. +type CPUTimesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CPUTimesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CPUTimesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CPUTimesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CPUTimesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CPUTimesValidationError) ErrorName() string { return "CPUTimesValidationError" } + +// Error satisfies the builtin error interface +func (e CPUTimesValidationError) 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 %sCPUTimes.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CPUTimesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CPUTimesValidationError{} + +// Validate checks the field values on Memory 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 *Memory) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Memory 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 MemoryMultiError, or nil if none found. +func (m *Memory) ValidateAll() error { + return m.validate(true) +} + +func (m *Memory) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Total + + // no validation rules for Available + + // no validation rules for Used + + if val := m.GetUsedPercent(); val < 0 || val > 100 { + err := MemoryValidationError{ + field: "UsedPercent", + reason: "value must be inside range [0, 100]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if val := m.GetProcessUsedPercent(); val < 0 || val > 100 { + err := MemoryValidationError{ + field: "ProcessUsedPercent", + reason: "value must be inside range [0, 100]", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Free + + if len(errors) > 0 { + return MemoryMultiError(errors) + } + + return nil +} + +// MemoryMultiError is an error wrapping multiple validation errors returned by +// Memory.ValidateAll() if the designated constraints aren't met. +type MemoryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MemoryMultiError) 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 MemoryMultiError) AllErrors() []error { return m } + +// MemoryValidationError is the validation error returned by Memory.Validate if +// the designated constraints aren't met. +type MemoryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MemoryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MemoryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MemoryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MemoryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MemoryValidationError) ErrorName() string { return "MemoryValidationError" } + +// Error satisfies the builtin error interface +func (e MemoryValidationError) 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 %sMemory.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MemoryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MemoryValidationError{} + +// Validate checks the field values on Network 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 *Network) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Network 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 NetworkMultiError, or nil if none found. +func (m *Network) ValidateAll() error { + return m.validate(true) +} + +func (m *Network) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for TcpConnectionCount + + // no validation rules for UploadTcpConnectionCount + + // no validation rules for SecurityDomain + + // no validation rules for Location + + // no validation rules for Idc + + if len(errors) > 0 { + return NetworkMultiError(errors) + } + + return nil +} + +// NetworkMultiError is an error wrapping multiple validation errors returned +// by Network.ValidateAll() if the designated constraints aren't met. +type NetworkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NetworkMultiError) 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 NetworkMultiError) AllErrors() []error { return m } + +// NetworkValidationError is the validation error returned by Network.Validate +// if the designated constraints aren't met. +type NetworkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e NetworkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e NetworkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e NetworkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e NetworkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e NetworkValidationError) ErrorName() string { return "NetworkValidationError" } + +// Error satisfies the builtin error interface +func (e NetworkValidationError) 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 %sNetwork.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = NetworkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = NetworkValidationError{} + +// Validate checks the field values on Disk 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 *Disk) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Disk 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 DiskMultiError, or nil if none found. +func (m *Disk) ValidateAll() error { + return m.validate(true) +} + +func (m *Disk) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Total + + // no validation rules for Free + + // no validation rules for Used + + if val := m.GetUsedPercent(); val < 0 || val > 100 { + err := DiskValidationError{ + field: "UsedPercent", + reason: "value must be inside range [0, 100]", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for InodesTotal + + // no validation rules for InodesUsed + + // no validation rules for InodesFree + + if val := m.GetInodesUsedPercent(); val < 0 || val > 100 { + err := DiskValidationError{ + field: "InodesUsedPercent", + reason: "value must be inside range [0, 100]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return DiskMultiError(errors) + } + + return nil +} + +// DiskMultiError is an error wrapping multiple validation errors returned by +// Disk.ValidateAll() if the designated constraints aren't met. +type DiskMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DiskMultiError) 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 DiskMultiError) AllErrors() []error { return m } + +// DiskValidationError is the validation error returned by Disk.Validate if the +// designated constraints aren't met. +type DiskValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DiskValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DiskValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DiskValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DiskValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DiskValidationError) ErrorName() string { return "DiskValidationError" } + +// Error satisfies the builtin error interface +func (e DiskValidationError) 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 %sDisk.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DiskValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DiskValidationError{} + +// Validate checks the field values on Build 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 *Build) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Build 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 BuildMultiError, or nil if none found. +func (m *Build) ValidateAll() error { + return m.validate(true) +} + +func (m *Build) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for GitVersion + + // no validation rules for GitCommit + + // no validation rules for GoVersion + + // no validation rules for Platform + + if len(errors) > 0 { + return BuildMultiError(errors) + } + + return nil +} + +// BuildMultiError is an error wrapping multiple validation errors returned by +// Build.ValidateAll() if the designated constraints aren't met. +type BuildMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BuildMultiError) 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 BuildMultiError) AllErrors() []error { return m } + +// BuildValidationError is the validation error returned by Build.Validate if +// the designated constraints aren't met. +type BuildValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BuildValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BuildValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BuildValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BuildValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BuildValidationError) ErrorName() string { return "BuildValidationError" } + +// Error satisfies the builtin error interface +func (e BuildValidationError) 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 %sBuild.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BuildValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BuildValidationError{} // Validate checks the field values on Download with the rules defined in the // proto definition for this message. If any rules are violated, the first @@ -1228,6 +2118,108 @@ var _ interface { var _Download_Digest_Pattern = regexp.MustCompile("^(md5)|(sha256):[A-Fa-f0-9]+$") +// Validate checks the field values on Range 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 *Range) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Range 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 RangeMultiError, or nil if none found. +func (m *Range) ValidateAll() error { + return m.validate(true) +} + +func (m *Range) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Start + + // no validation rules for Length + + if len(errors) > 0 { + return RangeMultiError(errors) + } + + return nil +} + +// RangeMultiError is an error wrapping multiple validation errors returned by +// Range.ValidateAll() if the designated constraints aren't met. +type RangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RangeMultiError) 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 RangeMultiError) AllErrors() []error { return m } + +// RangeValidationError is the validation error returned by Range.Validate if +// the designated constraints aren't met. +type RangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RangeValidationError) ErrorName() string { return "RangeValidationError" } + +// Error satisfies the builtin error interface +func (e RangeValidationError) 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 %sRange.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RangeValidationError{} + // Validate checks the field values on Piece 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/common/v2/common.proto b/pkg/apis/common/v2/common.proto index 7cee987..41026f1 100644 --- a/pkg/apis/common/v2/common.proto +++ b/pkg/apis/common/v2/common.proto @@ -176,28 +176,137 @@ message Task { message Host { // Host id. string id = 1 [(validate.rules).string.min_len = 1]; + // Host type. + uint32 type = 2 [(validate.rules).uint32.lte = 3]; + // Hostname. + string hostname = 3 [(validate.rules).string.min_len = 1]; // Host ip. - string ip = 2 [(validate.rules).string.min_len = 1]; - // Peer hostname. - string hostname = 3 [(validate.rules).string.hostname = true]; + string ip = 4 [(validate.rules).string.ip = true]; // Port of grpc service. - int32 port = 4 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; + int32 port = 5 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; // Port of download server. - int32 download_port = 5 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; - // Security domain for network. - string security_domain = 6 [(validate.rules).string = {min_len: 1, ignore_empty: true}]; - // Host location, eg: area|country|province|city. - string location = 7 [(validate.rules).string = {min_len: 1, ignore_empty: true}]; - // IDC where the peer host is located. - string idc = 8 [(validate.rules).string = {min_len: 1, ignore_empty: true}]; + int32 download_port = 6 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; + // Host OS. + string os = 7; + // Host platform. + string platform = 8; + // Host platform family. + string platform_family = 9; + // Host platform version. + string platform_version = 10; + // Host kernel version. + string kernel_version = 11; + // CPU Stat. + CPU cpu = 12 [(validate.rules).message.required = true]; + // Memory Stat. + Memory memory = 13 [(validate.rules).message.required = true]; + // Network Stat. + Network network = 14 [(validate.rules).message.required = true]; + // Disk Stat. + Disk disk = 15 [(validate.rules).message.required = true]; + // Build information. + Build build = 16 [(validate.rules).message.required = true]; } -// Range represents download range. -message Range { - // Start of range. - int64 start = 1; - // Length of range. - int64 length = 2; +// CPU Stat. +message CPU { + // Number of logical cores in the system. + uint32 logical_count = 1; + // Number of physical cores in the system + uint32 physical_count = 2; + // Percent calculates the percentage of cpu used. + double percent = 3 [(validate.rules).double = {gte: 0, lte: 100}]; + // Calculates the percentage of cpu used by process. + double process_percent = 4 [(validate.rules).double = {gte: 0, lte: 100}]; + // CPUTimes contains the amounts of time the CPU has spent performing different kinds of work. + CPUTimes times = 5 [(validate.rules).message.required = true]; +} + +// CPUTimes contains the amounts of time the CPU has spent performing different +// kinds of work. Time units are in seconds. +message CPUTimes { + // CPU time of user. + double user = 1 [(validate.rules).double.gte = 0]; + // CPU time of system. + double system = 2 [(validate.rules).double.gte = 0]; + // CPU time of idle. + double idle = 3 [(validate.rules).double.gte = 0]; + // CPU time of nice. + double nice = 4 [(validate.rules).double.gte = 0]; + // CPU time of iowait. + double iowait = 5 [(validate.rules).double.gte = 0]; + // CPU time of irq. + double irq = 6 [(validate.rules).double.gte = 0]; + // CPU time of softirq. + double softirq = 7 [(validate.rules).double.gte = 0]; + // CPU time of steal. + double steal = 8 [(validate.rules).double.gte = 0]; + // CPU time of guest. + double guest = 9 [(validate.rules).double.gte = 0]; + // CPU time of guest nice. + double guest_nice = 10 [(validate.rules).double.gte = 0]; +} + +// Memory Stat. +message Memory { + // Total amount of RAM on this system. + uint64 total = 1; + // RAM available for programs to allocate. + uint64 available = 2; + // RAM used by programs. + uint64 used = 3; + // Percentage of RAM used by programs. + double used_percent = 4 [(validate.rules).double = {gte: 0, lte: 100}]; + // Calculates the percentage of memory used by process. + double process_used_percent = 5 [(validate.rules).double = {gte: 0, lte: 100}]; + // This is the kernel's notion of free memory. + uint64 free = 6; +} + +// Network Stat. +message Network { + // Return count of tcp connections opened and status is ESTABLISHED. + uint32 tcp_connection_count = 1; + // Return count of upload tcp connections opened and status is ESTABLISHED. + uint32 upload_tcp_connection_count = 2; + // Security domain for network. + string security_domain = 3; + // Location path(area|country|province|city|...). + string location = 4; + // IDC where the peer host is located + string idc = 5; +} + +// Disk Stat. +message Disk { + // Total amount of disk on the data path of dragonfly. + uint64 total = 1; + // Free amount of disk on the data path of dragonfly. + uint64 free = 2; + // Used amount of disk on the data path of dragonfly. + uint64 used = 3; + // Used percent of disk on the data path of dragonfly directory. + double used_percent = 4 [(validate.rules).double = {gte: 0, lte: 100}]; + // Total amount of indoes on the data path of dragonfly directory. + uint64 inodes_total = 5; + // Used amount of indoes on the data path of dragonfly directory. + uint64 inodes_used = 6; + // Free amount of indoes on the data path of dragonfly directory. + uint64 inodes_free = 7; + // Used percent of indoes on the data path of dragonfly directory. + double inodes_used_percent = 8 [(validate.rules).double = {gte: 0, lte: 100}]; +} + +// Build information. +message Build { + // Git version. + string git_version = 1; + // Git commit. + string git_commit = 2; + // Golang version. + string go_version = 3; + // Build platform. + string platform = 4; } // Download information. @@ -232,6 +341,14 @@ message Download { bool need_back_to_source = 14; } +// Range represents download range. +message Range { + // Start of range. + int64 start = 1; + // Length of range. + int64 length = 2; +} + // Piece represents information of piece. message Piece { // Piece number. diff --git a/pkg/apis/scheduler/v2/scheduler.pb.go b/pkg/apis/scheduler/v2/scheduler.pb.go index 91ab5fa..e616c00 100644 --- a/pkg/apis/scheduler/v2/scheduler.pb.go +++ b/pkg/apis/scheduler/v2/scheduler.pb.go @@ -1259,38 +1259,8 @@ type AnnounceHostRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Host id. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Host type. - Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` - // Hostname. - Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` - // Host ip. - Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"` - // Port of grpc service. - Port int32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"` - // Port of download server. - DownloadPort int32 `protobuf:"varint,6,opt,name=download_port,json=downloadPort,proto3" json:"download_port,omitempty"` - // Host OS. - Os string `protobuf:"bytes,7,opt,name=os,proto3" json:"os,omitempty"` - // Host platform. - Platform string `protobuf:"bytes,8,opt,name=platform,proto3" json:"platform,omitempty"` - // Host platform family. - PlatformFamily string `protobuf:"bytes,9,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"` - // Host platform version. - PlatformVersion string `protobuf:"bytes,10,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"` - // Host kernel version. - KernelVersion string `protobuf:"bytes,11,opt,name=kernel_version,json=kernelVersion,proto3" json:"kernel_version,omitempty"` - // CPU Stat. - Cpu *CPU `protobuf:"bytes,12,opt,name=cpu,proto3" json:"cpu,omitempty"` - // Memory Stat. - Memory *Memory `protobuf:"bytes,13,opt,name=memory,proto3" json:"memory,omitempty"` - // Network Stat. - Network *Network `protobuf:"bytes,14,opt,name=network,proto3" json:"network,omitempty"` - // Disk Stat. - Disk *Disk `protobuf:"bytes,15,opt,name=disk,proto3" json:"disk,omitempty"` - // Build information. - Build *Build `protobuf:"bytes,16,opt,name=build,proto3" json:"build,omitempty"` + // Host info. + Host *v2.Host `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` } func (x *AnnounceHostRequest) Reset() { @@ -1325,701 +1295,13 @@ func (*AnnounceHostRequest) Descriptor() ([]byte, []int) { return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{18} } -func (x *AnnounceHostRequest) GetId() string { +func (x *AnnounceHostRequest) GetHost() *v2.Host { if x != nil { - return x.Id - } - return "" -} - -func (x *AnnounceHostRequest) GetType() uint32 { - if x != nil { - return x.Type - } - return 0 -} - -func (x *AnnounceHostRequest) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -func (x *AnnounceHostRequest) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -func (x *AnnounceHostRequest) GetPort() int32 { - if x != nil { - return x.Port - } - return 0 -} - -func (x *AnnounceHostRequest) GetDownloadPort() int32 { - if x != nil { - return x.DownloadPort - } - return 0 -} - -func (x *AnnounceHostRequest) GetOs() string { - if x != nil { - return x.Os - } - return "" -} - -func (x *AnnounceHostRequest) GetPlatform() string { - if x != nil { - return x.Platform - } - return "" -} - -func (x *AnnounceHostRequest) GetPlatformFamily() string { - if x != nil { - return x.PlatformFamily - } - return "" -} - -func (x *AnnounceHostRequest) GetPlatformVersion() string { - if x != nil { - return x.PlatformVersion - } - return "" -} - -func (x *AnnounceHostRequest) GetKernelVersion() string { - if x != nil { - return x.KernelVersion - } - return "" -} - -func (x *AnnounceHostRequest) GetCpu() *CPU { - if x != nil { - return x.Cpu + return x.Host } return nil } -func (x *AnnounceHostRequest) GetMemory() *Memory { - if x != nil { - return x.Memory - } - return nil -} - -func (x *AnnounceHostRequest) GetNetwork() *Network { - if x != nil { - return x.Network - } - return nil -} - -func (x *AnnounceHostRequest) GetDisk() *Disk { - if x != nil { - return x.Disk - } - return nil -} - -func (x *AnnounceHostRequest) GetBuild() *Build { - if x != nil { - return x.Build - } - return nil -} - -// CPU Stat. -type CPU struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Number of logical cores in the system. - LogicalCount uint32 `protobuf:"varint,1,opt,name=logical_count,json=logicalCount,proto3" json:"logical_count,omitempty"` - // Number of physical cores in the system - PhysicalCount uint32 `protobuf:"varint,2,opt,name=physical_count,json=physicalCount,proto3" json:"physical_count,omitempty"` - // Percent calculates the percentage of cpu used. - Percent float64 `protobuf:"fixed64,3,opt,name=percent,proto3" json:"percent,omitempty"` - // Calculates the percentage of cpu used by process. - ProcessPercent float64 `protobuf:"fixed64,4,opt,name=process_percent,json=processPercent,proto3" json:"process_percent,omitempty"` - // CPUTimes contains the amounts of time the CPU has spent performing different kinds of work. - Times *CPUTimes `protobuf:"bytes,5,opt,name=times,proto3" json:"times,omitempty"` -} - -func (x *CPU) Reset() { - *x = CPU{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CPU) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CPU) ProtoMessage() {} - -func (x *CPU) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[19] - 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 CPU.ProtoReflect.Descriptor instead. -func (*CPU) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{19} -} - -func (x *CPU) GetLogicalCount() uint32 { - if x != nil { - return x.LogicalCount - } - return 0 -} - -func (x *CPU) GetPhysicalCount() uint32 { - if x != nil { - return x.PhysicalCount - } - return 0 -} - -func (x *CPU) GetPercent() float64 { - if x != nil { - return x.Percent - } - return 0 -} - -func (x *CPU) GetProcessPercent() float64 { - if x != nil { - return x.ProcessPercent - } - return 0 -} - -func (x *CPU) GetTimes() *CPUTimes { - if x != nil { - return x.Times - } - return nil -} - -// CPUTimes contains the amounts of time the CPU has spent performing different -// kinds of work. Time units are in seconds. -type CPUTimes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // CPU time of user. - User float64 `protobuf:"fixed64,1,opt,name=user,proto3" json:"user,omitempty"` - // CPU time of system. - System float64 `protobuf:"fixed64,2,opt,name=system,proto3" json:"system,omitempty"` - // CPU time of idle. - Idle float64 `protobuf:"fixed64,3,opt,name=idle,proto3" json:"idle,omitempty"` - // CPU time of nice. - Nice float64 `protobuf:"fixed64,4,opt,name=nice,proto3" json:"nice,omitempty"` - // CPU time of iowait. - Iowait float64 `protobuf:"fixed64,5,opt,name=iowait,proto3" json:"iowait,omitempty"` - // CPU time of irq. - Irq float64 `protobuf:"fixed64,6,opt,name=irq,proto3" json:"irq,omitempty"` - // CPU time of softirq. - Softirq float64 `protobuf:"fixed64,7,opt,name=softirq,proto3" json:"softirq,omitempty"` - // CPU time of steal. - Steal float64 `protobuf:"fixed64,8,opt,name=steal,proto3" json:"steal,omitempty"` - // CPU time of guest. - Guest float64 `protobuf:"fixed64,9,opt,name=guest,proto3" json:"guest,omitempty"` - // CPU time of guest nice. - GuestNice float64 `protobuf:"fixed64,10,opt,name=guest_nice,json=guestNice,proto3" json:"guest_nice,omitempty"` -} - -func (x *CPUTimes) Reset() { - *x = CPUTimes{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CPUTimes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CPUTimes) ProtoMessage() {} - -func (x *CPUTimes) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[20] - 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 CPUTimes.ProtoReflect.Descriptor instead. -func (*CPUTimes) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{20} -} - -func (x *CPUTimes) GetUser() float64 { - if x != nil { - return x.User - } - return 0 -} - -func (x *CPUTimes) GetSystem() float64 { - if x != nil { - return x.System - } - return 0 -} - -func (x *CPUTimes) GetIdle() float64 { - if x != nil { - return x.Idle - } - return 0 -} - -func (x *CPUTimes) GetNice() float64 { - if x != nil { - return x.Nice - } - return 0 -} - -func (x *CPUTimes) GetIowait() float64 { - if x != nil { - return x.Iowait - } - return 0 -} - -func (x *CPUTimes) GetIrq() float64 { - if x != nil { - return x.Irq - } - return 0 -} - -func (x *CPUTimes) GetSoftirq() float64 { - if x != nil { - return x.Softirq - } - return 0 -} - -func (x *CPUTimes) GetSteal() float64 { - if x != nil { - return x.Steal - } - return 0 -} - -func (x *CPUTimes) GetGuest() float64 { - if x != nil { - return x.Guest - } - return 0 -} - -func (x *CPUTimes) GetGuestNice() float64 { - if x != nil { - return x.GuestNice - } - return 0 -} - -// Memory Stat. -type Memory struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Total amount of RAM on this system. - Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - // RAM available for programs to allocate. - Available uint64 `protobuf:"varint,2,opt,name=available,proto3" json:"available,omitempty"` - // RAM used by programs. - Used uint64 `protobuf:"varint,3,opt,name=used,proto3" json:"used,omitempty"` - // Percentage of RAM used by programs. - UsedPercent float64 `protobuf:"fixed64,4,opt,name=used_percent,json=usedPercent,proto3" json:"used_percent,omitempty"` - // Calculates the percentage of memory used by process. - ProcessUsedPercent float64 `protobuf:"fixed64,5,opt,name=process_used_percent,json=processUsedPercent,proto3" json:"process_used_percent,omitempty"` - // This is the kernel's notion of free memory. - Free uint64 `protobuf:"varint,6,opt,name=free,proto3" json:"free,omitempty"` -} - -func (x *Memory) Reset() { - *x = Memory{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Memory) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Memory) ProtoMessage() {} - -func (x *Memory) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[21] - 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 Memory.ProtoReflect.Descriptor instead. -func (*Memory) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{21} -} - -func (x *Memory) GetTotal() uint64 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *Memory) GetAvailable() uint64 { - if x != nil { - return x.Available - } - return 0 -} - -func (x *Memory) GetUsed() uint64 { - if x != nil { - return x.Used - } - return 0 -} - -func (x *Memory) GetUsedPercent() float64 { - if x != nil { - return x.UsedPercent - } - return 0 -} - -func (x *Memory) GetProcessUsedPercent() float64 { - if x != nil { - return x.ProcessUsedPercent - } - return 0 -} - -func (x *Memory) GetFree() uint64 { - if x != nil { - return x.Free - } - return 0 -} - -// Network Stat. -type Network struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Return count of tcp connections opened and status is ESTABLISHED. - TcpConnectionCount uint32 `protobuf:"varint,1,opt,name=tcp_connection_count,json=tcpConnectionCount,proto3" json:"tcp_connection_count,omitempty"` - // Return count of upload tcp connections opened and status is ESTABLISHED. - UploadTcpConnectionCount uint32 `protobuf:"varint,2,opt,name=upload_tcp_connection_count,json=uploadTcpConnectionCount,proto3" json:"upload_tcp_connection_count,omitempty"` - // Security domain for network. - SecurityDomain string `protobuf:"bytes,3,opt,name=security_domain,json=securityDomain,proto3" json:"security_domain,omitempty"` - // Location path(area|country|province|city|...). - Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` - // IDC where the peer host is located - Idc string `protobuf:"bytes,5,opt,name=idc,proto3" json:"idc,omitempty"` -} - -func (x *Network) Reset() { - *x = Network{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Network) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Network) ProtoMessage() {} - -func (x *Network) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[22] - 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 Network.ProtoReflect.Descriptor instead. -func (*Network) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{22} -} - -func (x *Network) GetTcpConnectionCount() uint32 { - if x != nil { - return x.TcpConnectionCount - } - return 0 -} - -func (x *Network) GetUploadTcpConnectionCount() uint32 { - if x != nil { - return x.UploadTcpConnectionCount - } - return 0 -} - -func (x *Network) GetSecurityDomain() string { - if x != nil { - return x.SecurityDomain - } - return "" -} - -func (x *Network) GetLocation() string { - if x != nil { - return x.Location - } - return "" -} - -func (x *Network) GetIdc() string { - if x != nil { - return x.Idc - } - return "" -} - -// Disk Stat. -type Disk struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Total amount of disk on the data path of dragonfly. - Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - // Free amount of disk on the data path of dragonfly. - Free uint64 `protobuf:"varint,2,opt,name=free,proto3" json:"free,omitempty"` - // Used amount of disk on the data path of dragonfly. - Used uint64 `protobuf:"varint,3,opt,name=used,proto3" json:"used,omitempty"` - // Used percent of disk on the data path of dragonfly directory. - UsedPercent float64 `protobuf:"fixed64,4,opt,name=used_percent,json=usedPercent,proto3" json:"used_percent,omitempty"` - // Total amount of indoes on the data path of dragonfly directory. - InodesTotal uint64 `protobuf:"varint,5,opt,name=inodes_total,json=inodesTotal,proto3" json:"inodes_total,omitempty"` - // Used amount of indoes on the data path of dragonfly directory. - InodesUsed uint64 `protobuf:"varint,6,opt,name=inodes_used,json=inodesUsed,proto3" json:"inodes_used,omitempty"` - // Free amount of indoes on the data path of dragonfly directory. - InodesFree uint64 `protobuf:"varint,7,opt,name=inodes_free,json=inodesFree,proto3" json:"inodes_free,omitempty"` - // Used percent of indoes on the data path of dragonfly directory. - InodesUsedPercent float64 `protobuf:"fixed64,8,opt,name=inodes_used_percent,json=inodesUsedPercent,proto3" json:"inodes_used_percent,omitempty"` -} - -func (x *Disk) Reset() { - *x = Disk{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Disk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Disk) ProtoMessage() {} - -func (x *Disk) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[23] - 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 Disk.ProtoReflect.Descriptor instead. -func (*Disk) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{23} -} - -func (x *Disk) GetTotal() uint64 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *Disk) GetFree() uint64 { - if x != nil { - return x.Free - } - return 0 -} - -func (x *Disk) GetUsed() uint64 { - if x != nil { - return x.Used - } - return 0 -} - -func (x *Disk) GetUsedPercent() float64 { - if x != nil { - return x.UsedPercent - } - return 0 -} - -func (x *Disk) GetInodesTotal() uint64 { - if x != nil { - return x.InodesTotal - } - return 0 -} - -func (x *Disk) GetInodesUsed() uint64 { - if x != nil { - return x.InodesUsed - } - return 0 -} - -func (x *Disk) GetInodesFree() uint64 { - if x != nil { - return x.InodesFree - } - return 0 -} - -func (x *Disk) GetInodesUsedPercent() float64 { - if x != nil { - return x.InodesUsedPercent - } - return 0 -} - -// Build information. -type Build struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Git version. - GitVersion string `protobuf:"bytes,1,opt,name=git_version,json=gitVersion,proto3" json:"git_version,omitempty"` - // Git commit. - GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` - // Golang version. - GoVersion string `protobuf:"bytes,3,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` - // Build platform. - Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"` -} - -func (x *Build) Reset() { - *x = Build{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Build) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Build) ProtoMessage() {} - -func (x *Build) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[24] - 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 Build.ProtoReflect.Descriptor instead. -func (*Build) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{24} -} - -func (x *Build) GetGitVersion() string { - if x != nil { - return x.GitVersion - } - return "" -} - -func (x *Build) GetGitCommit() string { - if x != nil { - return x.GitCommit - } - return "" -} - -func (x *Build) GetGoVersion() string { - if x != nil { - return x.GoVersion - } - return "" -} - -func (x *Build) GetPlatform() string { - if x != nil { - return x.Platform - } - return "" -} - // LeaveHostRequest represents request of LeaveHost. type LeaveHostRequest struct { state protoimpl.MessageState @@ -2033,7 +1315,7 @@ type LeaveHostRequest struct { func (x *LeaveHostRequest) Reset() { *x = LeaveHostRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[25] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2046,7 +1328,7 @@ func (x *LeaveHostRequest) String() string { func (*LeaveHostRequest) ProtoMessage() {} func (x *LeaveHostRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[25] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2059,7 +1341,7 @@ func (x *LeaveHostRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LeaveHostRequest.ProtoReflect.Descriptor instead. func (*LeaveHostRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{25} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{19} } func (x *LeaveHostRequest) GetId() string { @@ -2086,7 +1368,7 @@ type Probe struct { func (x *Probe) Reset() { *x = Probe{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[26] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2099,7 +1381,7 @@ func (x *Probe) String() string { func (*Probe) ProtoMessage() {} func (x *Probe) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[26] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2112,7 +1394,7 @@ func (x *Probe) ProtoReflect() protoreflect.Message { // Deprecated: Use Probe.ProtoReflect.Descriptor instead. func (*Probe) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{26} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{20} } func (x *Probe) GetHost() *v2.Host { @@ -2151,7 +1433,7 @@ type ProbesOfHost struct { func (x *ProbesOfHost) Reset() { *x = ProbesOfHost{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[27] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2164,7 +1446,7 @@ func (x *ProbesOfHost) String() string { func (*ProbesOfHost) ProtoMessage() {} func (x *ProbesOfHost) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[27] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2177,7 +1459,7 @@ func (x *ProbesOfHost) ProtoReflect() protoreflect.Message { // Deprecated: Use ProbesOfHost.ProtoReflect.Descriptor instead. func (*ProbesOfHost) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{27} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{21} } func (x *ProbesOfHost) GetHost() *v2.Host { @@ -2207,7 +1489,7 @@ type SyncProbesRequest struct { func (x *SyncProbesRequest) Reset() { *x = SyncProbesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[28] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2220,7 +1502,7 @@ func (x *SyncProbesRequest) String() string { func (*SyncProbesRequest) ProtoMessage() {} func (x *SyncProbesRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[28] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2233,7 +1515,7 @@ func (x *SyncProbesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncProbesRequest.ProtoReflect.Descriptor instead. func (*SyncProbesRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{28} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{22} } func (x *SyncProbesRequest) GetProbesOfHost() *ProbesOfHost { @@ -2258,7 +1540,7 @@ type SyncProbesResponse struct { func (x *SyncProbesResponse) Reset() { *x = SyncProbesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[29] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2271,7 +1553,7 @@ func (x *SyncProbesResponse) String() string { func (*SyncProbesResponse) ProtoMessage() {} func (x *SyncProbesResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[29] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2284,7 +1566,7 @@ func (x *SyncProbesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncProbesResponse.ProtoReflect.Descriptor instead. func (*SyncProbesResponse) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{29} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{23} } func (x *SyncProbesResponse) GetHosts() []*v2.Host { @@ -2314,7 +1596,7 @@ type UpdateHostsRequest struct { func (x *UpdateHostsRequest) Reset() { *x = UpdateHostsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[30] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2327,7 +1609,7 @@ func (x *UpdateHostsRequest) String() string { func (*UpdateHostsRequest) ProtoMessage() {} func (x *UpdateHostsRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[30] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2340,7 +1622,7 @@ func (x *UpdateHostsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateHostsRequest.ProtoReflect.Descriptor instead. func (*UpdateHostsRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{30} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{24} } func (x *UpdateHostsRequest) GetProbesOfHosts() []*ProbesOfHost { @@ -2363,7 +1645,7 @@ type DeleteHostsRequest struct { func (x *DeleteHostsRequest) Reset() { *x = DeleteHostsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[31] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2376,7 +1658,7 @@ func (x *DeleteHostsRequest) String() string { func (*DeleteHostsRequest) ProtoMessage() {} func (x *DeleteHostsRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[31] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2389,7 +1671,7 @@ func (x *DeleteHostsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteHostsRequest.ProtoReflect.Descriptor instead. func (*DeleteHostsRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{31} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{25} } func (x *DeleteHostsRequest) GetProbesOfHosts() []*ProbesOfHost { @@ -2415,7 +1697,7 @@ type SyncNetworkTopologyRequest struct { func (x *SyncNetworkTopologyRequest) Reset() { *x = SyncNetworkTopologyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[32] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2428,7 +1710,7 @@ func (x *SyncNetworkTopologyRequest) String() string { func (*SyncNetworkTopologyRequest) ProtoMessage() {} func (x *SyncNetworkTopologyRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[32] + mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2441,7 +1723,7 @@ func (x *SyncNetworkTopologyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncNetworkTopologyRequest.ProtoReflect.Descriptor instead. func (*SyncNetworkTopologyRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{32} + return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{26} } func (m *SyncNetworkTopologyRequest) GetRequest() isSyncNetworkTopologyRequest_Request { @@ -2710,257 +1992,124 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_rawDesc = []byte{ 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8e, 0x05, 0x0a, 0x13, 0x41, 0x6e, - 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, - 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x02, - 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, - 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, - 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, - 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x0c, 0x64, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, - 0x29, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6b, 0x65, - 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x2d, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x50, - 0x55, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x03, 0x63, 0x70, 0x75, - 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x39, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12, 0x33, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x22, 0xfe, 0x01, 0x0a, 0x03, 0x43, - 0x50, 0x55, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x63, - 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x68, 0x79, 0x73, 0x69, - 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0d, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, - 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, - 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x12, 0x40, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, - 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x22, 0x8d, 0x03, 0x0a, 0x08, - 0x43, 0x50, 0x55, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, - 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x06, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x52, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x6e, 0x69, 0x63, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x06, - 0x69, 0x6f, 0x77, 0x61, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, - 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x06, 0x69, 0x6f, - 0x77, 0x61, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x03, 0x69, 0x72, 0x71, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x03, 0x69, 0x72, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x6f, 0x66, 0x74, 0x69, 0x72, - 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x73, 0x6f, 0x66, 0x74, 0x69, 0x72, 0x71, - 0x12, 0x24, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x42, - 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x65, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x75, 0x65, 0x73, 0x74, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x67, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, - 0x67, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, - 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x52, 0x09, 0x67, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x69, 0x63, 0x65, 0x22, 0xeb, 0x01, 0x0a, 0x06, - 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, - 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x3a, - 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0b, 0x75, - 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x14, 0x70, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, 0x73, 0x65, 0x64, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x07, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x12, 0x74, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x75, 0x70, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x75, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, - 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, - 0x64, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x63, 0x22, 0xae, 0x02, - 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, - 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, - 0x75, 0x73, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, - 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x54, 0x6f, - 0x74, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x75, 0x73, - 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x55, 0x73, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x66, - 0x72, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x47, 0x0a, 0x13, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, - 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x11, 0x69, 0x6e, 0x6f, - 0x64, 0x65, 0x73, 0x55, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x82, - 0x01, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x69, 0x74, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, - 0x69, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, - 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x22, 0x2b, 0x0a, 0x10, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, - 0x22, 0xb2, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x72, 0x74, 0x74, - 0x18, 0x02, 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, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x72, 0x74, 0x74, - 0x12, 0x43, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0xb2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x76, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, - 0x66, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, - 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x68, 0x6f, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, - 0x04, 0x08, 0x01, 0x28, 0x01, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x22, 0x5f, 0x0a, - 0x11, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, - 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, - 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x22, 0x93, - 0x01, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, - 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x28, - 0x01, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x62, - 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 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, 0x08, 0xfa, 0x42, 0x05, - 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x22, 0x62, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x44, 0x0a, 0x13, 0x41, 0x6e, 0x6e, + 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x22, + 0x2b, 0x0a, 0x10, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb2, 0x01, 0x0a, + 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, + 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x72, 0x74, 0x74, 0x18, 0x02, 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, 0x08, 0xfa, + 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x72, 0x74, 0x74, 0x12, 0x43, 0x0a, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0xb2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x22, 0x76, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, + 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x6f, 0x73, 0x74, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, + 0x12, 0x37, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x50, 0x72, 0x6f, 0x62, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x28, + 0x01, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x22, 0x5f, 0x0a, 0x11, 0x53, 0x79, 0x6e, + 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, + 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, + 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, + 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x12, 0x53, + 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x28, 0x01, 0x52, 0x05, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 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, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x22, 0x62, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, + 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, + 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, + 0x6f, 0x73, 0x74, 0x73, 0x22, 0x62, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62, 0x65, - 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x62, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, - 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, - 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, - 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x22, 0xfc, 0x01, 0x0a, - 0x1a, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x1e, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, - 0x68, 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x1e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x72, - 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x1a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, - 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x32, 0xba, 0x05, 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, 0x43, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1e, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x65, 0x61, - 0x76, 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, 0x55, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x1a, 0x53, 0x79, 0x6e, + 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x1e, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, + 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x1a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x62, 0x65, + 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x66, 0x0a, 0x1e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, + 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x32, 0xba, 0x05, 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, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x65, 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, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 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, 0x43, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, - 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x65, 0x61, 0x76, 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, 0x59, 0x0a, - 0x13, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x28, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 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, 0x28, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 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, 0x32, 0x3b, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 0x43, 0x0a, 0x09, + 0x4c, 0x65, 0x61, 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x65, 0x61, 0x76, 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, 0x55, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x65, 0x65, + 0x72, 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 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, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x65, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 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, + 0x43, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x65, 0x61, 0x76, + 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, 0x59, 0x0a, 0x13, 0x53, 0x79, 0x6e, + 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x12, 0x28, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70, 0x6f, 0x6c, + 0x6f, 0x67, 0x79, 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, 0x28, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 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, 0x32, 0x3b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2975,7 +2124,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, 33) +var file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_pkg_apis_scheduler_v2_scheduler_proto_goTypes = []interface{}{ (*RegisterPeerRequest)(nil), // 0: scheduler.v2.RegisterPeerRequest (*DownloadPeerStartedRequest)(nil), // 1: scheduler.v2.DownloadPeerStartedRequest @@ -2996,39 +2145,33 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_goTypes = []interface{}{ (*LeavePeerRequest)(nil), // 16: scheduler.v2.LeavePeerRequest (*StatTaskRequest)(nil), // 17: scheduler.v2.StatTaskRequest (*AnnounceHostRequest)(nil), // 18: scheduler.v2.AnnounceHostRequest - (*CPU)(nil), // 19: scheduler.v2.CPU - (*CPUTimes)(nil), // 20: scheduler.v2.CPUTimes - (*Memory)(nil), // 21: scheduler.v2.Memory - (*Network)(nil), // 22: scheduler.v2.Network - (*Disk)(nil), // 23: scheduler.v2.Disk - (*Build)(nil), // 24: scheduler.v2.Build - (*LeaveHostRequest)(nil), // 25: scheduler.v2.LeaveHostRequest - (*Probe)(nil), // 26: scheduler.v2.Probe - (*ProbesOfHost)(nil), // 27: scheduler.v2.ProbesOfHost - (*SyncProbesRequest)(nil), // 28: scheduler.v2.SyncProbesRequest - (*SyncProbesResponse)(nil), // 29: scheduler.v2.SyncProbesResponse - (*UpdateHostsRequest)(nil), // 30: scheduler.v2.UpdateHostsRequest - (*DeleteHostsRequest)(nil), // 31: scheduler.v2.DeleteHostsRequest - (*SyncNetworkTopologyRequest)(nil), // 32: scheduler.v2.SyncNetworkTopologyRequest - (*v2.Download)(nil), // 33: common.v2.Download - (*v2.Piece)(nil), // 34: common.v2.Piece - (*v21.DownloadPeerBackToSourceFailed)(nil), // 35: errordetails.v2.DownloadPeerBackToSourceFailed - (*v21.DownloadPieceBackToSourceFailed)(nil), // 36: errordetails.v2.DownloadPieceBackToSourceFailed - (*v21.SyncPiecesFailed)(nil), // 37: errordetails.v2.SyncPiecesFailed - (*v21.DownloadPieceFailed)(nil), // 38: errordetails.v2.DownloadPieceFailed - (*v2.Peer)(nil), // 39: common.v2.Peer - (*v21.SchedulePeerForbidden)(nil), // 40: errordetails.v2.SchedulePeerForbidden - (*v21.SchedulePeerFailed)(nil), // 41: errordetails.v2.SchedulePeerFailed - (*v2.Host)(nil), // 42: common.v2.Host - (*durationpb.Duration)(nil), // 43: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 44: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 45: google.protobuf.Empty - (*v2.Task)(nil), // 46: common.v2.Task + (*LeaveHostRequest)(nil), // 19: scheduler.v2.LeaveHostRequest + (*Probe)(nil), // 20: scheduler.v2.Probe + (*ProbesOfHost)(nil), // 21: scheduler.v2.ProbesOfHost + (*SyncProbesRequest)(nil), // 22: scheduler.v2.SyncProbesRequest + (*SyncProbesResponse)(nil), // 23: scheduler.v2.SyncProbesResponse + (*UpdateHostsRequest)(nil), // 24: scheduler.v2.UpdateHostsRequest + (*DeleteHostsRequest)(nil), // 25: scheduler.v2.DeleteHostsRequest + (*SyncNetworkTopologyRequest)(nil), // 26: scheduler.v2.SyncNetworkTopologyRequest + (*v2.Download)(nil), // 27: common.v2.Download + (*v2.Piece)(nil), // 28: common.v2.Piece + (*v21.DownloadPeerBackToSourceFailed)(nil), // 29: errordetails.v2.DownloadPeerBackToSourceFailed + (*v21.DownloadPieceBackToSourceFailed)(nil), // 30: errordetails.v2.DownloadPieceBackToSourceFailed + (*v21.SyncPiecesFailed)(nil), // 31: errordetails.v2.SyncPiecesFailed + (*v21.DownloadPieceFailed)(nil), // 32: errordetails.v2.DownloadPieceFailed + (*v2.Peer)(nil), // 33: common.v2.Peer + (*v21.SchedulePeerForbidden)(nil), // 34: errordetails.v2.SchedulePeerForbidden + (*v21.SchedulePeerFailed)(nil), // 35: errordetails.v2.SchedulePeerFailed + (*v2.Host)(nil), // 36: common.v2.Host + (*durationpb.Duration)(nil), // 37: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 38: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 39: google.protobuf.Empty + (*v2.Task)(nil), // 40: common.v2.Task } var file_pkg_apis_scheduler_v2_scheduler_proto_depIdxs = []int32{ - 33, // 0: scheduler.v2.RegisterPeerRequest.download:type_name -> common.v2.Download - 34, // 1: scheduler.v2.DownloadPieceFinishedRequest.piece:type_name -> common.v2.Piece - 34, // 2: scheduler.v2.DownloadPieceBackToSourceFinishedRequest.piece:type_name -> common.v2.Piece + 27, // 0: scheduler.v2.RegisterPeerRequest.download:type_name -> common.v2.Download + 28, // 1: scheduler.v2.DownloadPieceFinishedRequest.piece:type_name -> common.v2.Piece + 28, // 2: scheduler.v2.DownloadPieceBackToSourceFinishedRequest.piece:type_name -> common.v2.Piece 0, // 3: scheduler.v2.AnnouncePeerRequest.register_peer_request:type_name -> scheduler.v2.RegisterPeerRequest 1, // 4: scheduler.v2.AnnouncePeerRequest.download_peer_started_request:type_name -> scheduler.v2.DownloadPeerStartedRequest 2, // 5: scheduler.v2.AnnouncePeerRequest.download_peer_back_to_source_started_request:type_name -> scheduler.v2.DownloadPeerBackToSourceStartedRequest @@ -3036,59 +2179,54 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_depIdxs = []int32{ 4, // 7: scheduler.v2.AnnouncePeerRequest.download_peer_back_to_source_finished_request:type_name -> scheduler.v2.DownloadPeerBackToSourceFinishedRequest 5, // 8: scheduler.v2.AnnouncePeerRequest.download_piece_finished_request:type_name -> scheduler.v2.DownloadPieceFinishedRequest 6, // 9: scheduler.v2.AnnouncePeerRequest.download_piece_back_to_source_finished_request:type_name -> scheduler.v2.DownloadPieceBackToSourceFinishedRequest - 35, // 10: scheduler.v2.AnnouncePeerRequest.download_peer_back_to_source_failed:type_name -> errordetails.v2.DownloadPeerBackToSourceFailed - 36, // 11: scheduler.v2.AnnouncePeerRequest.download_piece_back_to_source_failed:type_name -> errordetails.v2.DownloadPieceBackToSourceFailed - 37, // 12: scheduler.v2.AnnouncePeerRequest.sync_pieces_failed:type_name -> errordetails.v2.SyncPiecesFailed - 38, // 13: scheduler.v2.AnnouncePeerRequest.download_piece_failed:type_name -> errordetails.v2.DownloadPieceFailed - 34, // 14: scheduler.v2.SmallTaskResponse.piece:type_name -> common.v2.Piece - 39, // 15: scheduler.v2.NormalTaskResponse.candidate_parents:type_name -> common.v2.Peer + 29, // 10: scheduler.v2.AnnouncePeerRequest.download_peer_back_to_source_failed:type_name -> errordetails.v2.DownloadPeerBackToSourceFailed + 30, // 11: scheduler.v2.AnnouncePeerRequest.download_piece_back_to_source_failed:type_name -> errordetails.v2.DownloadPieceBackToSourceFailed + 31, // 12: scheduler.v2.AnnouncePeerRequest.sync_pieces_failed:type_name -> errordetails.v2.SyncPiecesFailed + 32, // 13: scheduler.v2.AnnouncePeerRequest.download_piece_failed:type_name -> errordetails.v2.DownloadPieceFailed + 28, // 14: scheduler.v2.SmallTaskResponse.piece:type_name -> common.v2.Piece + 33, // 15: scheduler.v2.NormalTaskResponse.candidate_parents:type_name -> common.v2.Peer 8, // 16: scheduler.v2.AnnouncePeerResponse.tiny_task_response:type_name -> scheduler.v2.TinyTaskResponse 9, // 17: scheduler.v2.AnnouncePeerResponse.small_task_response:type_name -> scheduler.v2.SmallTaskResponse 10, // 18: scheduler.v2.AnnouncePeerResponse.normal_task_response:type_name -> scheduler.v2.NormalTaskResponse 11, // 19: scheduler.v2.AnnouncePeerResponse.need_back_to_source_response:type_name -> scheduler.v2.NeedBackToSourceResponse - 40, // 20: scheduler.v2.AnnouncePeerResponse.schedule_peer_forbidden:type_name -> errordetails.v2.SchedulePeerForbidden - 41, // 21: scheduler.v2.AnnouncePeerResponse.schedule_peer_failed:type_name -> errordetails.v2.SchedulePeerFailed - 19, // 22: scheduler.v2.AnnounceHostRequest.cpu:type_name -> scheduler.v2.CPU - 21, // 23: scheduler.v2.AnnounceHostRequest.memory:type_name -> scheduler.v2.Memory - 22, // 24: scheduler.v2.AnnounceHostRequest.network:type_name -> scheduler.v2.Network - 23, // 25: scheduler.v2.AnnounceHostRequest.disk:type_name -> scheduler.v2.Disk - 24, // 26: scheduler.v2.AnnounceHostRequest.build:type_name -> scheduler.v2.Build - 20, // 27: scheduler.v2.CPU.times:type_name -> scheduler.v2.CPUTimes - 42, // 28: scheduler.v2.Probe.host:type_name -> common.v2.Host - 43, // 29: scheduler.v2.Probe.rtt:type_name -> google.protobuf.Duration - 44, // 30: scheduler.v2.Probe.updated_at:type_name -> google.protobuf.Timestamp - 42, // 31: scheduler.v2.ProbesOfHost.host:type_name -> common.v2.Host - 26, // 32: scheduler.v2.ProbesOfHost.probes:type_name -> scheduler.v2.Probe - 27, // 33: scheduler.v2.SyncProbesRequest.probes_of_host:type_name -> scheduler.v2.ProbesOfHost - 42, // 34: scheduler.v2.SyncProbesResponse.hosts:type_name -> common.v2.Host - 43, // 35: scheduler.v2.SyncProbesResponse.probe_interval:type_name -> google.protobuf.Duration - 27, // 36: scheduler.v2.UpdateHostsRequest.probes_of_hosts:type_name -> scheduler.v2.ProbesOfHost - 27, // 37: scheduler.v2.DeleteHostsRequest.probes_of_hosts:type_name -> scheduler.v2.ProbesOfHost - 30, // 38: scheduler.v2.SyncNetworkTopologyRequest.update_probes_of_hosts_request:type_name -> scheduler.v2.UpdateHostsRequest - 31, // 39: scheduler.v2.SyncNetworkTopologyRequest.delete_probes_of_hosts_request:type_name -> scheduler.v2.DeleteHostsRequest - 7, // 40: scheduler.v2.Scheduler.AnnouncePeer:input_type -> scheduler.v2.AnnouncePeerRequest - 13, // 41: scheduler.v2.Scheduler.StatPeer:input_type -> scheduler.v2.StatPeerRequest - 16, // 42: scheduler.v2.Scheduler.LeavePeer:input_type -> scheduler.v2.LeavePeerRequest - 14, // 43: scheduler.v2.Scheduler.ExchangePeer:input_type -> scheduler.v2.ExchangePeerRequest - 17, // 44: scheduler.v2.Scheduler.StatTask:input_type -> scheduler.v2.StatTaskRequest - 18, // 45: scheduler.v2.Scheduler.AnnounceHost:input_type -> scheduler.v2.AnnounceHostRequest - 25, // 46: scheduler.v2.Scheduler.LeaveHost:input_type -> scheduler.v2.LeaveHostRequest - 28, // 47: scheduler.v2.Scheduler.SyncProbes:input_type -> scheduler.v2.SyncProbesRequest - 32, // 48: scheduler.v2.Scheduler.SyncNetworkTopology:input_type -> scheduler.v2.SyncNetworkTopologyRequest - 12, // 49: scheduler.v2.Scheduler.AnnouncePeer:output_type -> scheduler.v2.AnnouncePeerResponse - 39, // 50: scheduler.v2.Scheduler.StatPeer:output_type -> common.v2.Peer - 45, // 51: scheduler.v2.Scheduler.LeavePeer:output_type -> google.protobuf.Empty - 15, // 52: scheduler.v2.Scheduler.ExchangePeer:output_type -> scheduler.v2.ExchangePeerResponse - 46, // 53: scheduler.v2.Scheduler.StatTask:output_type -> common.v2.Task - 45, // 54: scheduler.v2.Scheduler.AnnounceHost:output_type -> google.protobuf.Empty - 45, // 55: scheduler.v2.Scheduler.LeaveHost:output_type -> google.protobuf.Empty - 29, // 56: scheduler.v2.Scheduler.SyncProbes:output_type -> scheduler.v2.SyncProbesResponse - 45, // 57: scheduler.v2.Scheduler.SyncNetworkTopology:output_type -> google.protobuf.Empty - 49, // [49:58] is the sub-list for method output_type - 40, // [40:49] is the sub-list for method input_type - 40, // [40:40] is the sub-list for extension type_name - 40, // [40:40] is the sub-list for extension extendee - 0, // [0:40] is the sub-list for field type_name + 34, // 20: scheduler.v2.AnnouncePeerResponse.schedule_peer_forbidden:type_name -> errordetails.v2.SchedulePeerForbidden + 35, // 21: scheduler.v2.AnnouncePeerResponse.schedule_peer_failed:type_name -> errordetails.v2.SchedulePeerFailed + 36, // 22: scheduler.v2.AnnounceHostRequest.host:type_name -> common.v2.Host + 36, // 23: scheduler.v2.Probe.host:type_name -> common.v2.Host + 37, // 24: scheduler.v2.Probe.rtt:type_name -> google.protobuf.Duration + 38, // 25: scheduler.v2.Probe.updated_at:type_name -> google.protobuf.Timestamp + 36, // 26: scheduler.v2.ProbesOfHost.host:type_name -> common.v2.Host + 20, // 27: scheduler.v2.ProbesOfHost.probes:type_name -> scheduler.v2.Probe + 21, // 28: scheduler.v2.SyncProbesRequest.probes_of_host:type_name -> scheduler.v2.ProbesOfHost + 36, // 29: scheduler.v2.SyncProbesResponse.hosts:type_name -> common.v2.Host + 37, // 30: scheduler.v2.SyncProbesResponse.probe_interval:type_name -> google.protobuf.Duration + 21, // 31: scheduler.v2.UpdateHostsRequest.probes_of_hosts:type_name -> scheduler.v2.ProbesOfHost + 21, // 32: scheduler.v2.DeleteHostsRequest.probes_of_hosts:type_name -> scheduler.v2.ProbesOfHost + 24, // 33: scheduler.v2.SyncNetworkTopologyRequest.update_probes_of_hosts_request:type_name -> scheduler.v2.UpdateHostsRequest + 25, // 34: scheduler.v2.SyncNetworkTopologyRequest.delete_probes_of_hosts_request:type_name -> scheduler.v2.DeleteHostsRequest + 7, // 35: scheduler.v2.Scheduler.AnnouncePeer:input_type -> scheduler.v2.AnnouncePeerRequest + 13, // 36: scheduler.v2.Scheduler.StatPeer:input_type -> scheduler.v2.StatPeerRequest + 16, // 37: scheduler.v2.Scheduler.LeavePeer:input_type -> scheduler.v2.LeavePeerRequest + 14, // 38: scheduler.v2.Scheduler.ExchangePeer:input_type -> scheduler.v2.ExchangePeerRequest + 17, // 39: scheduler.v2.Scheduler.StatTask:input_type -> scheduler.v2.StatTaskRequest + 18, // 40: scheduler.v2.Scheduler.AnnounceHost:input_type -> scheduler.v2.AnnounceHostRequest + 19, // 41: scheduler.v2.Scheduler.LeaveHost:input_type -> scheduler.v2.LeaveHostRequest + 22, // 42: scheduler.v2.Scheduler.SyncProbes:input_type -> scheduler.v2.SyncProbesRequest + 26, // 43: scheduler.v2.Scheduler.SyncNetworkTopology:input_type -> scheduler.v2.SyncNetworkTopologyRequest + 12, // 44: scheduler.v2.Scheduler.AnnouncePeer:output_type -> scheduler.v2.AnnouncePeerResponse + 33, // 45: scheduler.v2.Scheduler.StatPeer:output_type -> common.v2.Peer + 39, // 46: scheduler.v2.Scheduler.LeavePeer:output_type -> google.protobuf.Empty + 15, // 47: scheduler.v2.Scheduler.ExchangePeer:output_type -> scheduler.v2.ExchangePeerResponse + 40, // 48: scheduler.v2.Scheduler.StatTask:output_type -> common.v2.Task + 39, // 49: scheduler.v2.Scheduler.AnnounceHost:output_type -> google.protobuf.Empty + 39, // 50: scheduler.v2.Scheduler.LeaveHost:output_type -> google.protobuf.Empty + 23, // 51: scheduler.v2.Scheduler.SyncProbes:output_type -> scheduler.v2.SyncProbesResponse + 39, // 52: scheduler.v2.Scheduler.SyncNetworkTopology:output_type -> google.protobuf.Empty + 44, // [44:53] is the sub-list for method output_type + 35, // [35:44] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name } func init() { file_pkg_apis_scheduler_v2_scheduler_proto_init() } @@ -3326,78 +2464,6 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { } } file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CPU); 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[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CPUTimes); 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[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Memory); 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[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Network); 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[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Disk); 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[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Build); 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[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LeaveHostRequest); i { case 0: return &v.state @@ -3409,7 +2475,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { return nil } } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Probe); i { case 0: return &v.state @@ -3421,7 +2487,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { return nil } } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProbesOfHost); i { case 0: return &v.state @@ -3433,7 +2499,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { return nil } } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncProbesRequest); i { case 0: return &v.state @@ -3445,7 +2511,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { return nil } } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncProbesResponse); i { case 0: return &v.state @@ -3457,7 +2523,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { return nil } } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateHostsRequest); i { case 0: return &v.state @@ -3469,7 +2535,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { return nil } } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteHostsRequest); i { case 0: return &v.state @@ -3481,7 +2547,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { return nil } } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncNetworkTopologyRequest); i { case 0: return &v.state @@ -3515,7 +2581,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { (*AnnouncePeerResponse_SchedulePeerForbidden)(nil), (*AnnouncePeerResponse_SchedulePeerFailed)(nil), } - file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[32].OneofWrappers = []interface{}{ + file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[26].OneofWrappers = []interface{}{ (*SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest)(nil), (*SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest)(nil), } @@ -3525,7 +2591,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_scheduler_v2_scheduler_proto_rawDesc, NumEnums: 0, - NumMessages: 33, + NumMessages: 27, 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 a318bcd..b799729 100644 --- a/pkg/apis/scheduler/v2/scheduler.pb.validate.go +++ b/pkg/apis/scheduler/v2/scheduler.pb.validate.go @@ -3039,85 +3039,9 @@ func (m *AnnounceHostRequest) validate(all bool) error { var errors []error - if utf8.RuneCountInString(m.GetId()) < 1 { + if m.GetHost() == nil { err := AnnounceHostRequestValidationError{ - field: "Id", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetType() > 3 { - err := AnnounceHostRequestValidationError{ - field: "Type", - reason: "value must be less than or equal to 3", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetHostname()) < 1 { - err := AnnounceHostRequestValidationError{ - field: "Hostname", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if ip := net.ParseIP(m.GetIp()); ip == nil { - err := AnnounceHostRequestValidationError{ - field: "Ip", - reason: "value must be a valid IP address", - } - if !all { - return err - } - errors = append(errors, err) - } - - if val := m.GetPort(); val < 1024 || val >= 65535 { - err := AnnounceHostRequestValidationError{ - field: "Port", - reason: "value must be inside range [1024, 65535)", - } - if !all { - return err - } - errors = append(errors, err) - } - - if val := m.GetDownloadPort(); val < 1024 || val >= 65535 { - err := AnnounceHostRequestValidationError{ - field: "DownloadPort", - reason: "value must be inside range [1024, 65535)", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Os - - // no validation rules for Platform - - // no validation rules for PlatformFamily - - // no validation rules for PlatformVersion - - // no validation rules for KernelVersion - - if m.GetCpu() == nil { - err := AnnounceHostRequestValidationError{ - field: "Cpu", + field: "Host", reason: "value is required", } if !all { @@ -3127,11 +3051,11 @@ func (m *AnnounceHostRequest) validate(all bool) error { } if all { - switch v := interface{}(m.GetCpu()).(type) { + switch v := interface{}(m.GetHost()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, AnnounceHostRequestValidationError{ - field: "Cpu", + field: "Host", reason: "embedded message failed validation", cause: err, }) @@ -3139,176 +3063,16 @@ func (m *AnnounceHostRequest) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, AnnounceHostRequestValidationError{ - field: "Cpu", + field: "Host", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetCpu()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AnnounceHostRequestValidationError{ - field: "Cpu", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetMemory() == nil { - err := AnnounceHostRequestValidationError{ - field: "Memory", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMemory()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AnnounceHostRequestValidationError{ - field: "Memory", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AnnounceHostRequestValidationError{ - field: "Memory", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMemory()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AnnounceHostRequestValidationError{ - field: "Memory", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetNetwork() == nil { - err := AnnounceHostRequestValidationError{ - field: "Network", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetNetwork()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AnnounceHostRequestValidationError{ - field: "Network", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AnnounceHostRequestValidationError{ - field: "Network", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNetwork()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AnnounceHostRequestValidationError{ - field: "Network", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetDisk() == nil { - err := AnnounceHostRequestValidationError{ - field: "Disk", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetDisk()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AnnounceHostRequestValidationError{ - field: "Disk", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AnnounceHostRequestValidationError{ - field: "Disk", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDisk()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AnnounceHostRequestValidationError{ - field: "Disk", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetBuild() == nil { - err := AnnounceHostRequestValidationError{ - field: "Build", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetBuild()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AnnounceHostRequestValidationError{ - field: "Build", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AnnounceHostRequestValidationError{ - field: "Build", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetBuild()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AnnounceHostRequestValidationError{ - field: "Build", + field: "Host", reason: "embedded message failed validation", cause: err, } @@ -3395,853 +3159,6 @@ var _ interface { ErrorName() string } = AnnounceHostRequestValidationError{} -// Validate checks the field values on CPU 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 *CPU) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CPU 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 CPUMultiError, or nil if none found. -func (m *CPU) ValidateAll() error { - return m.validate(true) -} - -func (m *CPU) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for LogicalCount - - // no validation rules for PhysicalCount - - if val := m.GetPercent(); val < 0 || val > 100 { - err := CPUValidationError{ - field: "Percent", - reason: "value must be inside range [0, 100]", - } - if !all { - return err - } - errors = append(errors, err) - } - - if val := m.GetProcessPercent(); val < 0 || val > 100 { - err := CPUValidationError{ - field: "ProcessPercent", - reason: "value must be inside range [0, 100]", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetTimes() == nil { - err := CPUValidationError{ - field: "Times", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTimes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CPUValidationError{ - field: "Times", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CPUValidationError{ - field: "Times", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTimes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CPUValidationError{ - field: "Times", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CPUMultiError(errors) - } - - return nil -} - -// CPUMultiError is an error wrapping multiple validation errors returned by -// CPU.ValidateAll() if the designated constraints aren't met. -type CPUMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CPUMultiError) 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 CPUMultiError) AllErrors() []error { return m } - -// CPUValidationError is the validation error returned by CPU.Validate if the -// designated constraints aren't met. -type CPUValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CPUValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CPUValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CPUValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CPUValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CPUValidationError) ErrorName() string { return "CPUValidationError" } - -// Error satisfies the builtin error interface -func (e CPUValidationError) 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 %sCPU.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CPUValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CPUValidationError{} - -// Validate checks the field values on CPUTimes 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 *CPUTimes) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CPUTimes 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 CPUTimesMultiError, or nil -// if none found. -func (m *CPUTimes) ValidateAll() error { - return m.validate(true) -} - -func (m *CPUTimes) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetUser() < 0 { - err := CPUTimesValidationError{ - field: "User", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetSystem() < 0 { - err := CPUTimesValidationError{ - field: "System", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetIdle() < 0 { - err := CPUTimesValidationError{ - field: "Idle", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetNice() < 0 { - err := CPUTimesValidationError{ - field: "Nice", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetIowait() < 0 { - err := CPUTimesValidationError{ - field: "Iowait", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetIrq() < 0 { - err := CPUTimesValidationError{ - field: "Irq", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetSoftirq() < 0 { - err := CPUTimesValidationError{ - field: "Softirq", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetSteal() < 0 { - err := CPUTimesValidationError{ - field: "Steal", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetGuest() < 0 { - err := CPUTimesValidationError{ - field: "Guest", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetGuestNice() < 0 { - err := CPUTimesValidationError{ - field: "GuestNice", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return CPUTimesMultiError(errors) - } - - return nil -} - -// CPUTimesMultiError is an error wrapping multiple validation errors returned -// by CPUTimes.ValidateAll() if the designated constraints aren't met. -type CPUTimesMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CPUTimesMultiError) 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 CPUTimesMultiError) AllErrors() []error { return m } - -// CPUTimesValidationError is the validation error returned by -// CPUTimes.Validate if the designated constraints aren't met. -type CPUTimesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CPUTimesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CPUTimesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CPUTimesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CPUTimesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CPUTimesValidationError) ErrorName() string { return "CPUTimesValidationError" } - -// Error satisfies the builtin error interface -func (e CPUTimesValidationError) 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 %sCPUTimes.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CPUTimesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CPUTimesValidationError{} - -// Validate checks the field values on Memory 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 *Memory) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Memory 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 MemoryMultiError, or nil if none found. -func (m *Memory) ValidateAll() error { - return m.validate(true) -} - -func (m *Memory) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Total - - // no validation rules for Available - - // no validation rules for Used - - if val := m.GetUsedPercent(); val < 0 || val > 100 { - err := MemoryValidationError{ - field: "UsedPercent", - reason: "value must be inside range [0, 100]", - } - if !all { - return err - } - errors = append(errors, err) - } - - if val := m.GetProcessUsedPercent(); val < 0 || val > 100 { - err := MemoryValidationError{ - field: "ProcessUsedPercent", - reason: "value must be inside range [0, 100]", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Free - - if len(errors) > 0 { - return MemoryMultiError(errors) - } - - return nil -} - -// MemoryMultiError is an error wrapping multiple validation errors returned by -// Memory.ValidateAll() if the designated constraints aren't met. -type MemoryMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MemoryMultiError) 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 MemoryMultiError) AllErrors() []error { return m } - -// MemoryValidationError is the validation error returned by Memory.Validate if -// the designated constraints aren't met. -type MemoryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MemoryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MemoryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MemoryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MemoryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MemoryValidationError) ErrorName() string { return "MemoryValidationError" } - -// Error satisfies the builtin error interface -func (e MemoryValidationError) 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 %sMemory.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MemoryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MemoryValidationError{} - -// Validate checks the field values on Network 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 *Network) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Network 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 NetworkMultiError, or nil if none found. -func (m *Network) ValidateAll() error { - return m.validate(true) -} - -func (m *Network) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for TcpConnectionCount - - // no validation rules for UploadTcpConnectionCount - - // no validation rules for SecurityDomain - - // no validation rules for Location - - // no validation rules for Idc - - if len(errors) > 0 { - return NetworkMultiError(errors) - } - - return nil -} - -// NetworkMultiError is an error wrapping multiple validation errors returned -// by Network.ValidateAll() if the designated constraints aren't met. -type NetworkMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NetworkMultiError) 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 NetworkMultiError) AllErrors() []error { return m } - -// NetworkValidationError is the validation error returned by Network.Validate -// if the designated constraints aren't met. -type NetworkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NetworkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NetworkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NetworkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NetworkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NetworkValidationError) ErrorName() string { return "NetworkValidationError" } - -// Error satisfies the builtin error interface -func (e NetworkValidationError) 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 %sNetwork.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NetworkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NetworkValidationError{} - -// Validate checks the field values on Disk 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 *Disk) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Disk 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 DiskMultiError, or nil if none found. -func (m *Disk) ValidateAll() error { - return m.validate(true) -} - -func (m *Disk) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Total - - // no validation rules for Free - - // no validation rules for Used - - if val := m.GetUsedPercent(); val < 0 || val > 100 { - err := DiskValidationError{ - field: "UsedPercent", - reason: "value must be inside range [0, 100]", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for InodesTotal - - // no validation rules for InodesUsed - - // no validation rules for InodesFree - - if val := m.GetInodesUsedPercent(); val < 0 || val > 100 { - err := DiskValidationError{ - field: "InodesUsedPercent", - reason: "value must be inside range [0, 100]", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return DiskMultiError(errors) - } - - return nil -} - -// DiskMultiError is an error wrapping multiple validation errors returned by -// Disk.ValidateAll() if the designated constraints aren't met. -type DiskMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DiskMultiError) 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 DiskMultiError) AllErrors() []error { return m } - -// DiskValidationError is the validation error returned by Disk.Validate if the -// designated constraints aren't met. -type DiskValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DiskValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DiskValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DiskValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DiskValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DiskValidationError) ErrorName() string { return "DiskValidationError" } - -// Error satisfies the builtin error interface -func (e DiskValidationError) 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 %sDisk.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DiskValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DiskValidationError{} - -// Validate checks the field values on Build 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 *Build) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Build 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 BuildMultiError, or nil if none found. -func (m *Build) ValidateAll() error { - return m.validate(true) -} - -func (m *Build) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for GitVersion - - // no validation rules for GitCommit - - // no validation rules for GoVersion - - // no validation rules for Platform - - if len(errors) > 0 { - return BuildMultiError(errors) - } - - return nil -} - -// BuildMultiError is an error wrapping multiple validation errors returned by -// Build.ValidateAll() if the designated constraints aren't met. -type BuildMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m BuildMultiError) 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 BuildMultiError) AllErrors() []error { return m } - -// BuildValidationError is the validation error returned by Build.Validate if -// the designated constraints aren't met. -type BuildValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BuildValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BuildValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BuildValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BuildValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BuildValidationError) ErrorName() string { return "BuildValidationError" } - -// Error satisfies the builtin error interface -func (e BuildValidationError) 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 %sBuild.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BuildValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BuildValidationError{} - // Validate checks the field values on LeaveHostRequest with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. diff --git a/pkg/apis/scheduler/v2/scheduler.proto b/pkg/apis/scheduler/v2/scheduler.proto index 1d3cf69..85607f4 100644 --- a/pkg/apis/scheduler/v2/scheduler.proto +++ b/pkg/apis/scheduler/v2/scheduler.proto @@ -178,139 +178,8 @@ message StatTaskRequest { // AnnounceHostRequest represents request of AnnounceHost. message AnnounceHostRequest { - // Host id. - string id = 1 [(validate.rules).string.min_len = 1]; - // Host type. - uint32 type = 2 [(validate.rules).uint32.lte = 3]; - // Hostname. - string hostname = 3 [(validate.rules).string.min_len = 1]; - // Host ip. - string ip = 4 [(validate.rules).string.ip = true]; - // Port of grpc service. - int32 port = 5 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; - // Port of download server. - int32 download_port = 6 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; - // Host OS. - string os = 7; - // Host platform. - string platform = 8; - // Host platform family. - string platform_family = 9; - // Host platform version. - string platform_version = 10; - // Host kernel version. - string kernel_version = 11; - // CPU Stat. - CPU cpu = 12 [(validate.rules).message.required = true]; - // Memory Stat. - Memory memory = 13 [(validate.rules).message.required = true]; - // Network Stat. - Network network = 14 [(validate.rules).message.required = true]; - // Disk Stat. - Disk disk = 15 [(validate.rules).message.required = true]; - // Build information. - Build build = 16 [(validate.rules).message.required = true]; -} - -// CPU Stat. -message CPU { - // Number of logical cores in the system. - uint32 logical_count = 1; - // Number of physical cores in the system - uint32 physical_count = 2; - // Percent calculates the percentage of cpu used. - double percent = 3 [(validate.rules).double = {gte: 0, lte: 100}]; - // Calculates the percentage of cpu used by process. - double process_percent = 4 [(validate.rules).double = {gte: 0, lte: 100}]; - // CPUTimes contains the amounts of time the CPU has spent performing different kinds of work. - CPUTimes times = 5 [(validate.rules).message.required = true]; -} - -// CPUTimes contains the amounts of time the CPU has spent performing different -// kinds of work. Time units are in seconds. -message CPUTimes { - // CPU time of user. - double user = 1 [(validate.rules).double.gte = 0]; - // CPU time of system. - double system = 2 [(validate.rules).double.gte = 0]; - // CPU time of idle. - double idle = 3 [(validate.rules).double.gte = 0]; - // CPU time of nice. - double nice = 4 [(validate.rules).double.gte = 0]; - // CPU time of iowait. - double iowait = 5 [(validate.rules).double.gte = 0]; - // CPU time of irq. - double irq = 6 [(validate.rules).double.gte = 0]; - // CPU time of softirq. - double softirq = 7 [(validate.rules).double.gte = 0]; - // CPU time of steal. - double steal = 8 [(validate.rules).double.gte = 0]; - // CPU time of guest. - double guest = 9 [(validate.rules).double.gte = 0]; - // CPU time of guest nice. - double guest_nice = 10 [(validate.rules).double.gte = 0]; -} - -// Memory Stat. -message Memory { - // Total amount of RAM on this system. - uint64 total = 1; - // RAM available for programs to allocate. - uint64 available = 2; - // RAM used by programs. - uint64 used = 3; - // Percentage of RAM used by programs. - double used_percent = 4 [(validate.rules).double = {gte: 0, lte: 100}]; - // Calculates the percentage of memory used by process. - double process_used_percent = 5 [(validate.rules).double = {gte: 0, lte: 100}]; - // This is the kernel's notion of free memory. - uint64 free = 6; -} - -// Network Stat. -message Network { - // Return count of tcp connections opened and status is ESTABLISHED. - uint32 tcp_connection_count = 1; - // Return count of upload tcp connections opened and status is ESTABLISHED. - uint32 upload_tcp_connection_count = 2; - // Security domain for network. - string security_domain = 3; - // Location path(area|country|province|city|...). - string location = 4; - // IDC where the peer host is located - string idc = 5; -} - -// Disk Stat. -message Disk { - // Total amount of disk on the data path of dragonfly. - uint64 total = 1; - // Free amount of disk on the data path of dragonfly. - uint64 free = 2; - // Used amount of disk on the data path of dragonfly. - uint64 used = 3; - // Used percent of disk on the data path of dragonfly directory. - double used_percent = 4 [(validate.rules).double = {gte: 0, lte: 100}]; - // Total amount of indoes on the data path of dragonfly directory. - uint64 inodes_total = 5; - // Used amount of indoes on the data path of dragonfly directory. - uint64 inodes_used = 6; - // Free amount of indoes on the data path of dragonfly directory. - uint64 inodes_free = 7; - // Used percent of indoes on the data path of dragonfly directory. - double inodes_used_percent = 8 [(validate.rules).double = {gte: 0, lte: 100}]; -} - -// Build information. -message Build { - // Git version. - string git_version = 1; - // Git commit. - string git_commit = 2; - // Golang version. - string go_version = 3; - // Build platform. - string platform = 4; + // Host info. + common.v2.Host host = 1 [(validate.rules).message.required = true]; } // LeaveHostRequest represents request of LeaveHost. diff --git a/proto/common.proto b/proto/common.proto index b9a534d..a55585e 100644 --- a/proto/common.proto +++ b/proto/common.proto @@ -170,28 +170,137 @@ message Task { message Host { // Host id. string id = 1; - // Host ip. - string ip = 2; - // Peer hostname. + // Host type. + uint32 type = 2; + // Hostname. string hostname = 3; + // Host ip. + string ip = 4; // Port of grpc service. - int32 port = 4; + int32 port = 5; // Port of download server. - int32 download_port = 5; - // Security domain for network. - string security_domain = 6; - // Host location, eg: area|country|province|city. - string location = 7; - // IDC where the peer host is located. - string idc = 8; + int32 download_port = 6; + // Host OS. + string os = 7; + // Host platform. + string platform = 8; + // Host platform family. + string platform_family = 9; + // Host platform version. + string platform_version = 10; + // Host kernel version. + string kernel_version = 11; + // CPU Stat. + CPU cpu = 12; + // Memory Stat. + Memory memory = 13; + // Network Stat. + Network network = 14; + // Disk Stat. + Disk disk = 15; + // Build information. + Build build = 16; } -// Range represents download range. -message Range { - // Start of range. - int64 start = 1; - // Length of range. - int64 length = 2; +// CPU Stat. +message CPU { + // Number of logical cores in the system. + uint32 logical_count = 1; + // Number of physical cores in the system + uint32 physical_count = 2; + // Percent calculates the percentage of cpu used. + double percent = 3; + // Calculates the percentage of cpu used by process. + double process_percent = 4; + // CPUTimes contains the amounts of time the CPU has spent performing different kinds of work. + CPUTimes times = 5; +} + +// CPUTimes contains the amounts of time the CPU has spent performing different +// kinds of work. Time units are in seconds. +message CPUTimes { + // CPU time of user. + double user = 1; + // CPU time of system. + double system = 2; + // CPU time of idle. + double idle = 3; + // CPU time of nice. + double nice = 4; + // CPU time of iowait. + double iowait = 5; + // CPU time of irq. + double irq = 6; + // CPU time of softirq. + double softirq = 7; + // CPU time of steal. + double steal = 8; + // CPU time of guest. + double guest = 9; + // CPU time of guest nice. + double guest_nice = 10; +} + +// Memory Stat. +message Memory { + // Total amount of RAM on this system. + uint64 total = 1; + // RAM available for programs to allocate. + uint64 available = 2; + // RAM used by programs. + uint64 used = 3; + // Percentage of RAM used by programs. + double used_percent = 4; + // Calculates the percentage of memory used by process. + double process_used_percent = 5; + // This is the kernel's notion of free memory. + uint64 free = 6; +} + +// Network Stat. +message Network { + // Return count of tcp connections opened and status is ESTABLISHED. + uint32 tcp_connection_count = 1; + // Return count of upload tcp connections opened and status is ESTABLISHED. + uint32 upload_tcp_connection_count = 2; + // Security domain for network. + string security_domain = 3; + // Location path(area|country|province|city|...). + string location = 4; + // IDC where the peer host is located + string idc = 5; +} + +// Disk Stat. +message Disk { + // Total amount of disk on the data path of dragonfly. + uint64 total = 1; + // Free amount of disk on the data path of dragonfly. + uint64 free = 2; + // Used amount of disk on the data path of dragonfly. + uint64 used = 3; + // Used percent of disk on the data path of dragonfly directory. + double used_percent = 4; + // Total amount of indoes on the data path of dragonfly directory. + uint64 inodes_total = 5; + // Used amount of indoes on the data path of dragonfly directory. + uint64 inodes_used = 6; + // Free amount of indoes on the data path of dragonfly directory. + uint64 inodes_free = 7; + // Used percent of indoes on the data path of dragonfly directory. + double inodes_used_percent = 8; +} + +// Build information. +message Build { + // Git version. + string git_version = 1; + // Git commit. + string git_commit = 2; + // Golang version. + string go_version = 3; + // Build platform. + string platform = 4; } // Download information. @@ -226,6 +335,14 @@ message Download { bool need_back_to_source = 14; } +// Range represents download range. +message Range { + // Start of range. + int64 start = 1; + // Length of range. + int64 length = 2; +} + // Piece represents information of piece. message Piece { // Piece number. diff --git a/proto/scheduler.proto b/proto/scheduler.proto index e9ba90a..700ccda 100644 --- a/proto/scheduler.proto +++ b/proto/scheduler.proto @@ -171,139 +171,7 @@ message StatTaskRequest { // AnnounceHostRequest represents request of AnnounceHost. message AnnounceHostRequest { - // Host id. - string id = 1; - // Host type. - uint32 type = 2; - // Hostname. - string hostname = 3; - // Host ip. - string ip = 4; - // Port of grpc service. - int32 port = 5; - // Port of download server. - int32 download_port = 6; - // Host OS. - string os = 7; - // Host platform. - string platform = 8; - // Host platform family. - string platform_family = 9; - // Host platform version. - string platform_version = 10; - // Host kernel version. - string kernel_version = 11; - // CPU Stat. - CPU cpu = 12; - // Memory Stat. - Memory memory = 13; - // Network Stat. - Network network = 14; - // Disk Stat. - Disk disk = 15; - // Build information. - Build build = 16; -} - -// CPU Stat. -message CPU { - // Number of logical cores in the system. - uint32 logical_count = 1; - // Number of physical cores in the system - uint32 physical_count = 2; - // Percent calculates the percentage of cpu used. - double percent = 3; - // Calculates the percentage of cpu used by process. - double process_percent = 4; - // CPUTimes contains the amounts of time the CPU has spent performing different kinds of work. - CPUTimes times = 5; -} - -// CPUTimes contains the amounts of time the CPU has spent performing different -// kinds of work. Time units are in seconds. -message CPUTimes { - // CPU time of user. - double user = 1; - // CPU time of system. - double system = 2; - // CPU time of idle. - double idle = 3; - // CPU time of nice. - double nice = 4; - // CPU time of iowait. - double iowait = 5; - // CPU time of irq. - double irq = 6; - // CPU time of softirq. - double softirq = 7; - // CPU time of steal. - double steal = 8; - // CPU time of guest. - double guest = 9; - // CPU time of guest nice. - double guest_nice = 10; -} - -// Memory Stat. -message Memory { - // Total amount of RAM on this system. - uint64 total = 1; - // RAM available for programs to allocate. - uint64 available = 2; - // RAM used by programs. - uint64 used = 3; - // Percentage of RAM used by programs. - double used_percent = 4; - // Calculates the percentage of memory used by process. - double process_used_percent = 5; - // This is the kernel's notion of free memory. - uint64 free = 6; -} - -// Network Stat. -message Network { - // Return count of tcp connections opened and status is ESTABLISHED. - uint32 tcp_connection_count = 1; - // Return count of upload tcp connections opened and status is ESTABLISHED. - uint32 upload_tcp_connection_count = 2; - // Security domain for network. - string security_domain = 3; - // Location path(area|country|province|city|...). - string location = 4; - // IDC where the peer host is located - string idc = 5; -} - -// Disk Stat. -message Disk { - // Total amount of disk on the data path of dragonfly. - uint64 total = 1; - // Free amount of disk on the data path of dragonfly. - uint64 free = 2; - // Used amount of disk on the data path of dragonfly. - uint64 used = 3; - // Used percent of disk on the data path of dragonfly directory. - double used_percent = 4; - // Total amount of indoes on the data path of dragonfly directory. - uint64 inodes_total = 5; - // Used amount of indoes on the data path of dragonfly directory. - uint64 inodes_used = 6; - // Free amount of indoes on the data path of dragonfly directory. - uint64 inodes_free = 7; - // Used percent of indoes on the data path of dragonfly directory. - double inodes_used_percent = 8; -} - -// Build information. -message Build { - // Git version. - string git_version = 1; - // Git commit. - string git_commit = 2; - // Golang version. - string go_version = 3; - // Build platform. - string platform = 4; + common.Host host = 1; } // LeaveHostRequest represents request of LeaveHost. diff --git a/src/common.rs b/src/common.rs index ee10634..233f4b9 100644 --- a/src/common.rs +++ b/src/common.rs @@ -105,38 +105,196 @@ pub struct Host { /// Host id. #[prost(string, tag = "1")] pub id: ::prost::alloc::string::String, - /// Host ip. - #[prost(string, tag = "2")] - pub ip: ::prost::alloc::string::String, - /// Peer hostname. + /// Host type. + #[prost(uint32, tag = "2")] + pub r#type: u32, + /// Hostname. #[prost(string, tag = "3")] pub hostname: ::prost::alloc::string::String, + /// Host ip. + #[prost(string, tag = "4")] + pub ip: ::prost::alloc::string::String, /// Port of grpc service. - #[prost(int32, tag = "4")] + #[prost(int32, tag = "5")] pub port: i32, /// Port of download server. - #[prost(int32, tag = "5")] + #[prost(int32, tag = "6")] pub download_port: i32, - /// Security domain for network. - #[prost(string, tag = "6")] - pub security_domain: ::prost::alloc::string::String, - /// Host location, eg: area|country|province|city. + /// Host OS. #[prost(string, tag = "7")] - pub location: ::prost::alloc::string::String, - /// IDC where the peer host is located. + pub os: ::prost::alloc::string::String, + /// Host platform. #[prost(string, tag = "8")] - pub idc: ::prost::alloc::string::String, + pub platform: ::prost::alloc::string::String, + /// Host platform family. + #[prost(string, tag = "9")] + pub platform_family: ::prost::alloc::string::String, + /// Host platform version. + #[prost(string, tag = "10")] + pub platform_version: ::prost::alloc::string::String, + /// Host kernel version. + #[prost(string, tag = "11")] + pub kernel_version: ::prost::alloc::string::String, + /// CPU Stat. + #[prost(message, optional, tag = "12")] + pub cpu: ::core::option::Option, + /// Memory Stat. + #[prost(message, optional, tag = "13")] + pub memory: ::core::option::Option, + /// Network Stat. + #[prost(message, optional, tag = "14")] + pub network: ::core::option::Option, + /// Disk Stat. + #[prost(message, optional, tag = "15")] + pub disk: ::core::option::Option, + /// Build information. + #[prost(message, optional, tag = "16")] + pub build: ::core::option::Option, } -/// Range represents download range. +/// CPU Stat. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Range { - /// Start of range. - #[prost(int64, tag = "1")] - pub start: i64, - /// Length of range. - #[prost(int64, tag = "2")] - pub length: i64, +pub struct Cpu { + /// Number of logical cores in the system. + #[prost(uint32, tag = "1")] + pub logical_count: u32, + /// Number of physical cores in the system + #[prost(uint32, tag = "2")] + pub physical_count: u32, + /// Percent calculates the percentage of cpu used. + #[prost(double, tag = "3")] + pub percent: f64, + /// Calculates the percentage of cpu used by process. + #[prost(double, tag = "4")] + pub process_percent: f64, + /// CPUTimes contains the amounts of time the CPU has spent performing different kinds of work. + #[prost(message, optional, tag = "5")] + pub times: ::core::option::Option, +} +/// CPUTimes contains the amounts of time the CPU has spent performing different +/// kinds of work. Time units are in seconds. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CpuTimes { + /// CPU time of user. + #[prost(double, tag = "1")] + pub user: f64, + /// CPU time of system. + #[prost(double, tag = "2")] + pub system: f64, + /// CPU time of idle. + #[prost(double, tag = "3")] + pub idle: f64, + /// CPU time of nice. + #[prost(double, tag = "4")] + pub nice: f64, + /// CPU time of iowait. + #[prost(double, tag = "5")] + pub iowait: f64, + /// CPU time of irq. + #[prost(double, tag = "6")] + pub irq: f64, + /// CPU time of softirq. + #[prost(double, tag = "7")] + pub softirq: f64, + /// CPU time of steal. + #[prost(double, tag = "8")] + pub steal: f64, + /// CPU time of guest. + #[prost(double, tag = "9")] + pub guest: f64, + /// CPU time of guest nice. + #[prost(double, tag = "10")] + pub guest_nice: f64, +} +/// Memory Stat. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Memory { + /// Total amount of RAM on this system. + #[prost(uint64, tag = "1")] + pub total: u64, + /// RAM available for programs to allocate. + #[prost(uint64, tag = "2")] + pub available: u64, + /// RAM used by programs. + #[prost(uint64, tag = "3")] + pub used: u64, + /// Percentage of RAM used by programs. + #[prost(double, tag = "4")] + pub used_percent: f64, + /// Calculates the percentage of memory used by process. + #[prost(double, tag = "5")] + pub process_used_percent: f64, + /// This is the kernel's notion of free memory. + #[prost(uint64, tag = "6")] + pub free: u64, +} +/// Network Stat. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Network { + /// Return count of tcp connections opened and status is ESTABLISHED. + #[prost(uint32, tag = "1")] + pub tcp_connection_count: u32, + /// Return count of upload tcp connections opened and status is ESTABLISHED. + #[prost(uint32, tag = "2")] + pub upload_tcp_connection_count: u32, + /// Security domain for network. + #[prost(string, tag = "3")] + pub security_domain: ::prost::alloc::string::String, + /// Location path(area|country|province|city|...). + #[prost(string, tag = "4")] + pub location: ::prost::alloc::string::String, + /// IDC where the peer host is located + #[prost(string, tag = "5")] + pub idc: ::prost::alloc::string::String, +} +/// Disk Stat. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Disk { + /// Total amount of disk on the data path of dragonfly. + #[prost(uint64, tag = "1")] + pub total: u64, + /// Free amount of disk on the data path of dragonfly. + #[prost(uint64, tag = "2")] + pub free: u64, + /// Used amount of disk on the data path of dragonfly. + #[prost(uint64, tag = "3")] + pub used: u64, + /// Used percent of disk on the data path of dragonfly directory. + #[prost(double, tag = "4")] + pub used_percent: f64, + /// Total amount of indoes on the data path of dragonfly directory. + #[prost(uint64, tag = "5")] + pub inodes_total: u64, + /// Used amount of indoes on the data path of dragonfly directory. + #[prost(uint64, tag = "6")] + pub inodes_used: u64, + /// Free amount of indoes on the data path of dragonfly directory. + #[prost(uint64, tag = "7")] + pub inodes_free: u64, + /// Used percent of indoes on the data path of dragonfly directory. + #[prost(double, tag = "8")] + pub inodes_used_percent: f64, +} +/// Build information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Build { + /// Git version. + #[prost(string, tag = "1")] + pub git_version: ::prost::alloc::string::String, + /// Git commit. + #[prost(string, tag = "2")] + pub git_commit: ::prost::alloc::string::String, + /// Golang version. + #[prost(string, tag = "3")] + pub go_version: ::prost::alloc::string::String, + /// Build platform. + #[prost(string, tag = "4")] + pub platform: ::prost::alloc::string::String, } /// Download information. #[allow(clippy::derive_partial_eq_without_eq)] @@ -188,6 +346,17 @@ pub struct Download { #[prost(bool, tag = "14")] pub need_back_to_source: bool, } +/// Range represents download range. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Range { + /// Start of range. + #[prost(int64, tag = "1")] + pub start: i64, + /// Length of range. + #[prost(int64, tag = "2")] + pub length: i64, +} /// Piece represents information of piece. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/src/scheduler.rs b/src/scheduler.rs index eef7ade..2e3249e 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -231,199 +231,8 @@ pub struct StatTaskRequest { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AnnounceHostRequest { - /// Host id. - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - /// Host type. - #[prost(uint32, tag = "2")] - pub r#type: u32, - /// Hostname. - #[prost(string, tag = "3")] - pub hostname: ::prost::alloc::string::String, - /// Host ip. - #[prost(string, tag = "4")] - pub ip: ::prost::alloc::string::String, - /// Port of grpc service. - #[prost(int32, tag = "5")] - pub port: i32, - /// Port of download server. - #[prost(int32, tag = "6")] - pub download_port: i32, - /// Host OS. - #[prost(string, tag = "7")] - pub os: ::prost::alloc::string::String, - /// Host platform. - #[prost(string, tag = "8")] - pub platform: ::prost::alloc::string::String, - /// Host platform family. - #[prost(string, tag = "9")] - pub platform_family: ::prost::alloc::string::String, - /// Host platform version. - #[prost(string, tag = "10")] - pub platform_version: ::prost::alloc::string::String, - /// Host kernel version. - #[prost(string, tag = "11")] - pub kernel_version: ::prost::alloc::string::String, - /// CPU Stat. - #[prost(message, optional, tag = "12")] - pub cpu: ::core::option::Option, - /// Memory Stat. - #[prost(message, optional, tag = "13")] - pub memory: ::core::option::Option, - /// Network Stat. - #[prost(message, optional, tag = "14")] - pub network: ::core::option::Option, - /// Disk Stat. - #[prost(message, optional, tag = "15")] - pub disk: ::core::option::Option, - /// Build information. - #[prost(message, optional, tag = "16")] - pub build: ::core::option::Option, -} -/// CPU Stat. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Cpu { - /// Number of logical cores in the system. - #[prost(uint32, tag = "1")] - pub logical_count: u32, - /// Number of physical cores in the system - #[prost(uint32, tag = "2")] - pub physical_count: u32, - /// Percent calculates the percentage of cpu used. - #[prost(double, tag = "3")] - pub percent: f64, - /// Calculates the percentage of cpu used by process. - #[prost(double, tag = "4")] - pub process_percent: f64, - /// CPUTimes contains the amounts of time the CPU has spent performing different kinds of work. - #[prost(message, optional, tag = "5")] - pub times: ::core::option::Option, -} -/// CPUTimes contains the amounts of time the CPU has spent performing different -/// kinds of work. Time units are in seconds. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CpuTimes { - /// CPU time of user. - #[prost(double, tag = "1")] - pub user: f64, - /// CPU time of system. - #[prost(double, tag = "2")] - pub system: f64, - /// CPU time of idle. - #[prost(double, tag = "3")] - pub idle: f64, - /// CPU time of nice. - #[prost(double, tag = "4")] - pub nice: f64, - /// CPU time of iowait. - #[prost(double, tag = "5")] - pub iowait: f64, - /// CPU time of irq. - #[prost(double, tag = "6")] - pub irq: f64, - /// CPU time of softirq. - #[prost(double, tag = "7")] - pub softirq: f64, - /// CPU time of steal. - #[prost(double, tag = "8")] - pub steal: f64, - /// CPU time of guest. - #[prost(double, tag = "9")] - pub guest: f64, - /// CPU time of guest nice. - #[prost(double, tag = "10")] - pub guest_nice: f64, -} -/// Memory Stat. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Memory { - /// Total amount of RAM on this system. - #[prost(uint64, tag = "1")] - pub total: u64, - /// RAM available for programs to allocate. - #[prost(uint64, tag = "2")] - pub available: u64, - /// RAM used by programs. - #[prost(uint64, tag = "3")] - pub used: u64, - /// Percentage of RAM used by programs. - #[prost(double, tag = "4")] - pub used_percent: f64, - /// Calculates the percentage of memory used by process. - #[prost(double, tag = "5")] - pub process_used_percent: f64, - /// This is the kernel's notion of free memory. - #[prost(uint64, tag = "6")] - pub free: u64, -} -/// Network Stat. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Network { - /// Return count of tcp connections opened and status is ESTABLISHED. - #[prost(uint32, tag = "1")] - pub tcp_connection_count: u32, - /// Return count of upload tcp connections opened and status is ESTABLISHED. - #[prost(uint32, tag = "2")] - pub upload_tcp_connection_count: u32, - /// Security domain for network. - #[prost(string, tag = "3")] - pub security_domain: ::prost::alloc::string::String, - /// Location path(area|country|province|city|...). - #[prost(string, tag = "4")] - pub location: ::prost::alloc::string::String, - /// IDC where the peer host is located - #[prost(string, tag = "5")] - pub idc: ::prost::alloc::string::String, -} -/// Disk Stat. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Disk { - /// Total amount of disk on the data path of dragonfly. - #[prost(uint64, tag = "1")] - pub total: u64, - /// Free amount of disk on the data path of dragonfly. - #[prost(uint64, tag = "2")] - pub free: u64, - /// Used amount of disk on the data path of dragonfly. - #[prost(uint64, tag = "3")] - pub used: u64, - /// Used percent of disk on the data path of dragonfly directory. - #[prost(double, tag = "4")] - pub used_percent: f64, - /// Total amount of indoes on the data path of dragonfly directory. - #[prost(uint64, tag = "5")] - pub inodes_total: u64, - /// Used amount of indoes on the data path of dragonfly directory. - #[prost(uint64, tag = "6")] - pub inodes_used: u64, - /// Free amount of indoes on the data path of dragonfly directory. - #[prost(uint64, tag = "7")] - pub inodes_free: u64, - /// Used percent of indoes on the data path of dragonfly directory. - #[prost(double, tag = "8")] - pub inodes_used_percent: f64, -} -/// Build information. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Build { - /// Git version. - #[prost(string, tag = "1")] - pub git_version: ::prost::alloc::string::String, - /// Git commit. - #[prost(string, tag = "2")] - pub git_commit: ::prost::alloc::string::String, - /// Golang version. - #[prost(string, tag = "3")] - pub go_version: ::prost::alloc::string::String, - /// Build platform. - #[prost(string, tag = "4")] - pub platform: ::prost::alloc::string::String, + #[prost(message, optional, tag = "1")] + pub host: ::core::option::Option, } /// LeaveHostRequest represents request of LeaveHost. #[allow(clippy::derive_partial_eq_without_eq)]