mirror of https://github.com/dragonflyoss/api.git
feat: add SyncProbe to scheduler (#60)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
17e8ae331e
commit
66a713927e
|
@ -36,46 +36,57 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Code represents the code of the grpc api.
|
||||
type Code int32
|
||||
|
||||
const (
|
||||
Code_X_UNSPECIFIED Code = 0
|
||||
// success code 200-299
|
||||
// Success code 200-299.
|
||||
Code_Success Code = 200
|
||||
// framework can not find server node
|
||||
// Framework can not find server node.
|
||||
Code_ServerUnavailable Code = 500
|
||||
// common response error 1000-1999
|
||||
// client can be migrated to another scheduler/CDN
|
||||
// Common response error 1000-1999.
|
||||
// Client can be migrated to another scheduler/CDN.
|
||||
Code_ResourceLacked Code = 1000
|
||||
Code_BackToSourceAborted Code = 1001
|
||||
Code_BadRequest Code = 1400
|
||||
Code_PeerTaskNotFound Code = 1404
|
||||
Code_UnknownError Code = 1500
|
||||
Code_RequestTimeOut Code = 1504
|
||||
// client response error 4000-4999
|
||||
// Client response error 4000-4999.
|
||||
Code_ClientError Code = 4000
|
||||
Code_ClientPieceRequestFail Code = 4001 // get piece task from other peer error
|
||||
Code_ClientScheduleTimeout Code = 4002 // wait scheduler response timeout
|
||||
// Get piece task from other peer error.
|
||||
Code_ClientPieceRequestFail Code = 4001
|
||||
// Wait scheduler response timeout.
|
||||
Code_ClientScheduleTimeout Code = 4002
|
||||
Code_ClientContextCanceled Code = 4003
|
||||
Code_ClientWaitPieceReady Code = 4004 // when target peer downloads from source slowly, should wait
|
||||
// When target peer downloads from source slowly, should wait.
|
||||
Code_ClientWaitPieceReady Code = 4004
|
||||
Code_ClientPieceDownloadFail Code = 4005
|
||||
Code_ClientRequestLimitFail Code = 4006
|
||||
Code_ClientConnectionError Code = 4007
|
||||
Code_ClientBackSourceError Code = 4008
|
||||
Code_ClientPieceNotFound Code = 4404
|
||||
// scheduler response error 5000-5999
|
||||
// Scheduler response error 5000-5999.
|
||||
Code_SchedError Code = 5000
|
||||
Code_SchedNeedBackSource Code = 5001 // client should try to download from source
|
||||
Code_SchedPeerGone Code = 5002 // client should disconnect from scheduler
|
||||
Code_SchedPeerNotFound Code = 5004 // peer not found in scheduler
|
||||
Code_SchedPeerPieceResultReportFail Code = 5005 // report piece
|
||||
Code_SchedTaskStatusError Code = 5006 // task status is fail
|
||||
Code_SchedReregister Code = 5007 // task should be reregister
|
||||
Code_SchedForbidden Code = 5008 // task should be forbidden
|
||||
// cdnsystem response error 6000-6999
|
||||
// Client should try to download from source.
|
||||
Code_SchedNeedBackSource Code = 5001
|
||||
// Client should disconnect from scheduler.
|
||||
Code_SchedPeerGone Code = 5002
|
||||
// Peer not found in scheduler.
|
||||
Code_SchedPeerNotFound Code = 5004
|
||||
// Report piece.
|
||||
Code_SchedPeerPieceResultReportFail Code = 5005
|
||||
// Task status is fail.
|
||||
Code_SchedTaskStatusError Code = 5006
|
||||
// Task should be reregister.
|
||||
Code_SchedReregister Code = 5007
|
||||
// Task should be forbidden.
|
||||
Code_SchedForbidden Code = 5008
|
||||
// CDN system response error 6000-6999.
|
||||
Code_CDNTaskRegistryFail Code = 6001
|
||||
Code_CDNTaskNotFound Code = 6404
|
||||
// manager response error 7000-7999
|
||||
// Manager response error 7000-7999.
|
||||
Code_InvalidResourceType Code = 7001
|
||||
)
|
||||
|
||||
|
@ -174,6 +185,7 @@ func (Code) EnumDescriptor() ([]byte, []int) {
|
|||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// PieceStyle represents the style of piece.
|
||||
type PieceStyle int32
|
||||
|
||||
const (
|
||||
|
@ -217,16 +229,17 @@ func (PieceStyle) EnumDescriptor() ([]byte, []int) {
|
|||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
// SizeScope represents size scope of task.
|
||||
type SizeScope int32
|
||||
|
||||
const (
|
||||
// size > one piece size
|
||||
// size > one piece size.
|
||||
SizeScope_NORMAL SizeScope = 0
|
||||
// 128 byte < size <= one piece size and be plain type
|
||||
// 128 byte < size <= one piece size and be plain type.
|
||||
SizeScope_SMALL SizeScope = 1
|
||||
// size <= 128 byte and be plain type
|
||||
// size <= 128 byte and be plain type.
|
||||
SizeScope_TINY SizeScope = 2
|
||||
// size == 0 byte and be plain type
|
||||
// size == 0 byte and be plain type.
|
||||
SizeScope_EMPTY SizeScope = 3
|
||||
)
|
||||
|
||||
|
@ -411,6 +424,7 @@ func (Priority) EnumDescriptor() ([]byte, []int) {
|
|||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
// GrpcDfError represents error of the grpc.
|
||||
type GrpcDfError struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -472,19 +486,19 @@ type UrlMeta struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// digest checks integrity of url content, for example md5:xxx or sha256:yyy
|
||||
// Digest checks integrity of url content, for example md5:xxx or sha256:yyy.
|
||||
Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
|
||||
// url tag identifies different task for same url, conflict with digest
|
||||
// URL tag identifies different task for same url, conflict with digest.
|
||||
Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
|
||||
// content range for url
|
||||
// Content range for url.
|
||||
Range string `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"`
|
||||
// filter url used to generate task id
|
||||
// Filter url used to generate task id.
|
||||
Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
|
||||
// other url header infos
|
||||
// Other url header infos.
|
||||
Header map[string]string `protobuf:"bytes,5,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// application
|
||||
// Application.
|
||||
Application string `protobuf:"bytes,6,opt,name=application,proto3" json:"application,omitempty"`
|
||||
// priority
|
||||
// Priority.
|
||||
Priority Priority `protobuf:"varint,7,opt,name=priority,proto3,enum=common.Priority" json:"priority,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -569,72 +583,7 @@ func (x *UrlMeta) GetPriority() Priority {
|
|||
return Priority_LEVEL0
|
||||
}
|
||||
|
||||
type HostLoad struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// cpu usage
|
||||
CpuRatio float32 `protobuf:"fixed32,1,opt,name=cpu_ratio,json=cpuRatio,proto3" json:"cpu_ratio,omitempty"`
|
||||
// memory usage
|
||||
MemRatio float32 `protobuf:"fixed32,2,opt,name=mem_ratio,json=memRatio,proto3" json:"mem_ratio,omitempty"`
|
||||
// disk space usage
|
||||
DiskRatio float32 `protobuf:"fixed32,3,opt,name=disk_ratio,json=diskRatio,proto3" json:"disk_ratio,omitempty"`
|
||||
}
|
||||
|
||||
func (x *HostLoad) Reset() {
|
||||
*x = HostLoad{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HostLoad) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HostLoad) ProtoMessage() {}
|
||||
|
||||
func (x *HostLoad) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HostLoad.ProtoReflect.Descriptor instead.
|
||||
func (*HostLoad) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *HostLoad) GetCpuRatio() float32 {
|
||||
if x != nil {
|
||||
return x.CpuRatio
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *HostLoad) GetMemRatio() float32 {
|
||||
if x != nil {
|
||||
return x.MemRatio
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *HostLoad) GetDiskRatio() float32 {
|
||||
if x != nil {
|
||||
return x.DiskRatio
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// PieceTaskRequest represents request of PieceTask.
|
||||
type PieceTaskRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -643,16 +592,16 @@ type PieceTaskRequest struct {
|
|||
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
||||
SrcPid string `protobuf:"bytes,2,opt,name=src_pid,json=srcPid,proto3" json:"src_pid,omitempty"`
|
||||
DstPid string `protobuf:"bytes,3,opt,name=dst_pid,json=dstPid,proto3" json:"dst_pid,omitempty"`
|
||||
// piece number
|
||||
// Piece number.
|
||||
StartNum uint32 `protobuf:"varint,4,opt,name=start_num,json=startNum,proto3" json:"start_num,omitempty"`
|
||||
// expected piece count, limit = 0 represent request pieces as many shards as possible
|
||||
// Expected piece count, limit = 0 represent request pieces as many shards as possible.
|
||||
Limit uint32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PieceTaskRequest) Reset() {
|
||||
*x = PieceTaskRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[3]
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -665,7 +614,7 @@ func (x *PieceTaskRequest) String() string {
|
|||
func (*PieceTaskRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PieceTaskRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[3]
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -678,7 +627,7 @@ func (x *PieceTaskRequest) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use PieceTaskRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PieceTaskRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{3}
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *PieceTaskRequest) GetTaskId() string {
|
||||
|
@ -716,26 +665,27 @@ func (x *PieceTaskRequest) GetLimit() uint32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// Piece metadata.
|
||||
type PieceInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// piece_num < 0 represent start report piece flag
|
||||
// If piece_num is less than zero, it means to start report piece flag.
|
||||
PieceNum int32 `protobuf:"varint,1,opt,name=piece_num,json=pieceNum,proto3" json:"piece_num,omitempty"`
|
||||
RangeStart uint64 `protobuf:"varint,2,opt,name=range_start,json=rangeStart,proto3" json:"range_start,omitempty"`
|
||||
RangeSize uint32 `protobuf:"varint,3,opt,name=range_size,json=rangeSize,proto3" json:"range_size,omitempty"`
|
||||
PieceMd5 string `protobuf:"bytes,4,opt,name=piece_md5,json=pieceMd5,proto3" json:"piece_md5,omitempty"`
|
||||
PieceOffset uint64 `protobuf:"varint,5,opt,name=piece_offset,json=pieceOffset,proto3" json:"piece_offset,omitempty"`
|
||||
PieceStyle PieceStyle `protobuf:"varint,6,opt,name=piece_style,json=pieceStyle,proto3,enum=common.PieceStyle" json:"piece_style,omitempty"`
|
||||
// total time(millisecond) consumed
|
||||
// Cost of the downloading.
|
||||
DownloadCost uint64 `protobuf:"varint,7,opt,name=download_cost,json=downloadCost,proto3" json:"download_cost,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PieceInfo) Reset() {
|
||||
*x = PieceInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[4]
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -748,7 +698,7 @@ func (x *PieceInfo) String() string {
|
|||
func (*PieceInfo) ProtoMessage() {}
|
||||
|
||||
func (x *PieceInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[4]
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -761,7 +711,7 @@ func (x *PieceInfo) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use PieceInfo.ProtoReflect.Descriptor instead.
|
||||
func (*PieceInfo) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{4}
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *PieceInfo) GetPieceNum() int32 {
|
||||
|
@ -813,23 +763,24 @@ func (x *PieceInfo) GetDownloadCost() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// ExtendAttribute is extend attribute.
|
||||
type ExtendAttribute struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// task response header, eg: HTTP Response Header
|
||||
// Task response header, eg: HTTP Response Header.
|
||||
Header map[string]string `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// task response code, eg: HTTP Status Code
|
||||
// Task response code, eg: HTTP Status Code.
|
||||
StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
|
||||
// task response status, eg: HTTP Status
|
||||
// Task response status, eg: HTTP Status.
|
||||
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ExtendAttribute) Reset() {
|
||||
*x = ExtendAttribute{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[5]
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -842,7 +793,7 @@ func (x *ExtendAttribute) String() string {
|
|||
func (*ExtendAttribute) ProtoMessage() {}
|
||||
|
||||
func (x *ExtendAttribute) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[5]
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -855,7 +806,7 @@ func (x *ExtendAttribute) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use ExtendAttribute.ProtoReflect.Descriptor instead.
|
||||
func (*ExtendAttribute) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{5}
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ExtendAttribute) GetHeader() map[string]string {
|
||||
|
@ -879,6 +830,7 @@ func (x *ExtendAttribute) GetStatus() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
// Piece metadata.
|
||||
type PiecePacket struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -886,23 +838,23 @@ type PiecePacket struct {
|
|||
|
||||
TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
||||
DstPid string `protobuf:"bytes,3,opt,name=dst_pid,json=dstPid,proto3" json:"dst_pid,omitempty"`
|
||||
// ip:port
|
||||
// Address of the remote peer.
|
||||
DstAddr string `protobuf:"bytes,4,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"`
|
||||
PieceInfos []*PieceInfo `protobuf:"bytes,5,rep,name=piece_infos,json=pieceInfos,proto3" json:"piece_infos,omitempty"`
|
||||
// total piece count for url, total_piece represent total piece is unknown
|
||||
// Total piece count for url, total_piece represent total piece is unknown.
|
||||
TotalPiece int32 `protobuf:"varint,6,opt,name=total_piece,json=totalPiece,proto3" json:"total_piece,omitempty"`
|
||||
// content_length < 0 represent content length is unknown
|
||||
// If content_length is less than zero, it means content length is unknown.
|
||||
ContentLength int64 `protobuf:"varint,7,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
|
||||
// sha256 code of all piece md5
|
||||
// Sha256 code of all piece md5.
|
||||
PieceMd5Sign string `protobuf:"bytes,8,opt,name=piece_md5_sign,json=pieceMd5Sign,proto3" json:"piece_md5_sign,omitempty"`
|
||||
// task extend attribute
|
||||
// Task extend attribute.
|
||||
ExtendAttribute *ExtendAttribute `protobuf:"bytes,9,opt,name=extend_attribute,json=extendAttribute,proto3" json:"extend_attribute,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PiecePacket) Reset() {
|
||||
*x = PiecePacket{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[6]
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -915,7 +867,7 @@ func (x *PiecePacket) String() string {
|
|||
func (*PiecePacket) ProtoMessage() {}
|
||||
|
||||
func (x *PiecePacket) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[6]
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -928,7 +880,7 @@ func (x *PiecePacket) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use PiecePacket.ProtoReflect.Descriptor instead.
|
||||
func (*PiecePacket) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{6}
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *PiecePacket) GetTaskId() string {
|
||||
|
@ -987,6 +939,127 @@ func (x *PiecePacket) GetExtendAttribute() *ExtendAttribute {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Host metadata.
|
||||
type Host struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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.
|
||||
Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||||
// Port of grpc service.
|
||||
Port int32 `protobuf:"varint,4,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(area, country, province, city, etc.).
|
||||
Location []string `protobuf:"bytes,7,rep,name=location,proto3" json:"location,omitempty"`
|
||||
// IDC where the peer host is located.
|
||||
Idc string `protobuf:"bytes,8,opt,name=idc,proto3" json:"idc,omitempty"`
|
||||
// Network topology(switch, router, etc.).
|
||||
NetTopology []string `protobuf:"bytes,9,rep,name=net_topology,json=netTopology,proto3" json:"net_topology,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Host) Reset() {
|
||||
*x = Host{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_common_v1_common_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Host) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Host) ProtoMessage() {}
|
||||
|
||||
func (x *Host) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_common_v1_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 Host.ProtoReflect.Descriptor instead.
|
||||
func (*Host) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_common_v1_common_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *Host) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Host) GetIp() string {
|
||||
if x != nil {
|
||||
return x.Ip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Host) GetHostname() string {
|
||||
if x != nil {
|
||||
return x.Hostname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Host) GetPort() int32 {
|
||||
if x != nil {
|
||||
return x.Port
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Host) GetDownloadPort() int32 {
|
||||
if x != nil {
|
||||
return x.DownloadPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Host) GetSecurityDomain() string {
|
||||
if x != nil {
|
||||
return x.SecurityDomain
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Host) GetLocation() []string {
|
||||
if x != nil {
|
||||
return x.Location
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Host) GetIdc() string {
|
||||
if x != nil {
|
||||
return x.Idc
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Host) GetNetTopology() []string {
|
||||
if x != nil {
|
||||
return x.NetTopology
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_pkg_apis_common_v1_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pkg_apis_common_v1_common_proto_rawDesc = []byte{
|
||||
|
@ -1021,148 +1094,160 @@ var file_pkg_apis_common_v1_common_proto_rawDesc = []byte{
|
|||
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, 0x96, 0x01, 0x0a, 0x08, 0x48, 0x6f, 0x73, 0x74, 0x4c, 0x6f,
|
||||
0x61, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x0a, 0x0a, 0x1d, 0x00, 0x00, 0x80,
|
||||
0x3f, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x08, 0x63, 0x70, 0x75, 0x52, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x12, 0x2c, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x0a, 0x0a, 0x1d, 0x00, 0x00, 0x80, 0x3f, 0x2d,
|
||||
0x00, 0x00, 0x00, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x2e,
|
||||
0x0a, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x0a, 0x0a, 0x1d, 0x00, 0x00, 0x80, 0x3f, 0x2d, 0x00,
|
||||
0x00, 0x00, 0x00, 0x52, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x22, 0xbd,
|
||||
0x01, 0x0a, 0x10, 0x50, 0x69, 0x65, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74,
|
||||
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x69, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52,
|
||||
0x06, 0x73, 0x72, 0x63, 0x50, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x5f, 0x70,
|
||||
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10,
|
||||
0x01, 0x52, 0x06, 0x64, 0x73, 0x74, 0x50, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x74, 0x61,
|
||||
0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42,
|
||||
0x04, 0x2a, 0x02, 0x28, 0x00, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x12,
|
||||
0x1d, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07,
|
||||
0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x00, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xe3,
|
||||
0x02, 0x0a, 0x09, 0x50, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09,
|
||||
0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x08, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07,
|
||||
0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x00, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74,
|
||||
0x61, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x00,
|
||||
0x52, 0x09, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x70,
|
||||
0x69, 0x65, 0x63, 0x65, 0x5f, 0x6d, 0x64, 0x35, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3b,
|
||||
0xfa, 0x42, 0x38, 0x72, 0x36, 0x32, 0x31, 0x28, 0x5b, 0x61, 0x2d, 0x66, 0x5c, 0x64, 0x5d, 0x7b,
|
||||
0x33, 0x32, 0x7d, 0x7c, 0x5b, 0x41, 0x2d, 0x46, 0x5c, 0x64, 0x5d, 0x7b, 0x33, 0x32, 0x7d, 0x7c,
|
||||
0x5b, 0x61, 0x2d, 0x66, 0x5c, 0x64, 0x5d, 0x7b, 0x31, 0x36, 0x7d, 0x7c, 0x5b, 0x41, 0x2d, 0x46,
|
||||
0x5c, 0x64, 0x5d, 0x7b, 0x31, 0x36, 0x7d, 0x29, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x70, 0x69, 0x65,
|
||||
0x63, 0x65, 0x4d, 0x64, 0x35, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6f,
|
||||
0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04,
|
||||
0x32, 0x02, 0x28, 0x00, 0x52, 0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65,
|
||||
0x74, 0x12, 0x33, 0x0a, 0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x50, 0x69, 0x65, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x0a, 0x70, 0x69, 0x65, 0x63,
|
||||
0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa,
|
||||
0x42, 0x04, 0x32, 0x02, 0x28, 0x00, 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64,
|
||||
0x43, 0x6f, 0x73, 0x74, 0x22, 0xc2, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41,
|
||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 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, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 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, 0x22, 0xdb, 0x02, 0x0a, 0x0b, 0x50, 0x69,
|
||||
0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73,
|
||||
0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
|
||||
0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x64,
|
||||
0x73, 0x74, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42,
|
||||
0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x64, 0x73, 0x74, 0x50, 0x69, 0x64, 0x12, 0x22, 0x0a,
|
||||
0x08, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x64, 0x73, 0x74, 0x41, 0x64, 0x64,
|
||||
0x72, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73,
|
||||
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x50, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70,
|
||||
0x69, 0x65, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61,
|
||||
0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a,
|
||||
0x0e, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6d, 0x64, 0x35, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4d, 0x64, 0x35, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x12, 0x42, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x74,
|
||||
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74,
|
||||
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74,
|
||||
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2a, 0xd9, 0x05, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x12, 0x11, 0x0a, 0x0d, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
|
||||
0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0xc8,
|
||||
0x01, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x61, 0x76, 0x61,
|
||||
0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xf4, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x52, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x10, 0xe8, 0x07, 0x12, 0x18,
|
||||
0x0a, 0x13, 0x42, 0x61, 0x63, 0x6b, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x62,
|
||||
0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xe9, 0x07, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x15, 0x0a, 0x10, 0x50, 0x65, 0x65,
|
||||
0x72, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xfc, 0x0a,
|
||||
0x12, 0x11, 0x0a, 0x0c, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72,
|
||||
0x10, 0xdc, 0x0b, 0x12, 0x13, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x4f, 0x75, 0x74, 0x10, 0xe0, 0x0b, 0x12, 0x10, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65,
|
||||
0x6e, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa0, 0x1f, 0x12, 0x1b, 0x0a, 0x16, 0x43, 0x6c,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x46, 0x61, 0x69, 0x6c, 0x10, 0xa1, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e,
|
||||
0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
|
||||
0x10, 0xa2, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x65, 0x78, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0xa3, 0x1f, 0x12,
|
||||
0x19, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x57, 0x61, 0x69, 0x74, 0x50, 0x69, 0x65,
|
||||
0x63, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0xa4, 0x1f, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x6c,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xa5, 0x1f, 0x12, 0x1b, 0x0a, 0x16, 0x43, 0x6c, 0x69, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x46, 0x61,
|
||||
0x69, 0x6c, 0x10, 0xa6, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
|
||||
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa7,
|
||||
0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x53,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa8, 0x1f, 0x12, 0x18, 0x0a,
|
||||
0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46,
|
||||
0x6f, 0x75, 0x6e, 0x64, 0x10, 0xb4, 0x22, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x63, 0x68, 0x65, 0x64,
|
||||
0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x88, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65,
|
||||
0x64, 0x4e, 0x65, 0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x10,
|
||||
0x89, 0x27, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x47,
|
||||
0x6f, 0x6e, 0x65, 0x10, 0x8a, 0x27, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50,
|
||||
0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x8c, 0x27, 0x12, 0x23,
|
||||
0x0a, 0x1e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x50, 0x69, 0x65, 0x63, 0x65,
|
||||
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x61, 0x69, 0x6c,
|
||||
0x10, 0x8d, 0x27, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x63, 0x68, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x8e, 0x27, 0x12, 0x14,
|
||||
0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
|
||||
0x72, 0x10, 0x8f, 0x27, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x46, 0x6f, 0x72,
|
||||
0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10, 0x90, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x43, 0x44, 0x4e,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x46, 0x61, 0x69, 0x6c,
|
||||
0x10, 0xf1, 0x2e, 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x44, 0x4e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f,
|
||||
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x84, 0x32, 0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x76,
|
||||
0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x10, 0xd9, 0x36, 0x2a, 0x17, 0x0a, 0x0a, 0x50, 0x69, 0x65, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c,
|
||||
0x65, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x2a, 0x37, 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, 0x2a, 0x30, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70,
|
||||
0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0b, 0x0a,
|
||||
0x07, 0x44, 0x66, 0x43, 0x61, 0x63, 0x68, 0x65, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x66,
|
||||
0x53, 0x74, 0x6f, 0x72, 0x65, 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, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbd, 0x01, 0x0a, 0x10, 0x50, 0x69, 0x65, 0x63, 0x65, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61,
|
||||
0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
|
||||
0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x07,
|
||||
0x73, 0x72, 0x63, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
|
||||
0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x72, 0x63, 0x50, 0x69, 0x64, 0x12, 0x20,
|
||||
0x0a, 0x07, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x64, 0x73, 0x74, 0x50, 0x69, 0x64,
|
||||
0x12, 0x24, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x00, 0x52, 0x08, 0x73, 0x74,
|
||||
0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x00, 0x52, 0x05,
|
||||
0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xe3, 0x02, 0x0a, 0x09, 0x50, 0x69, 0x65, 0x63, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d,
|
||||
0x12, 0x28, 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x00, 0x52, 0x0a,
|
||||
0x72, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x72, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07,
|
||||
0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x00, 0x52, 0x09, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x69,
|
||||
0x7a, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6d, 0x64, 0x35, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3b, 0xfa, 0x42, 0x38, 0x72, 0x36, 0x32, 0x31, 0x28, 0x5b,
|
||||
0x61, 0x2d, 0x66, 0x5c, 0x64, 0x5d, 0x7b, 0x33, 0x32, 0x7d, 0x7c, 0x5b, 0x41, 0x2d, 0x46, 0x5c,
|
||||
0x64, 0x5d, 0x7b, 0x33, 0x32, 0x7d, 0x7c, 0x5b, 0x61, 0x2d, 0x66, 0x5c, 0x64, 0x5d, 0x7b, 0x31,
|
||||
0x36, 0x7d, 0x7c, 0x5b, 0x41, 0x2d, 0x46, 0x5c, 0x64, 0x5d, 0x7b, 0x31, 0x36, 0x7d, 0x29, 0xd0,
|
||||
0x01, 0x01, 0x52, 0x08, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4d, 0x64, 0x35, 0x12, 0x2a, 0x0a, 0x0c,
|
||||
0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x00, 0x52, 0x0b, 0x70, 0x69, 0x65,
|
||||
0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x70, 0x69, 0x65, 0x63,
|
||||
0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c,
|
||||
0x65, 0x52, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x2c, 0x0a,
|
||||
0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x00, 0x52, 0x0c, 0x64,
|
||||
0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x73, 0x74, 0x22, 0xc2, 0x01, 0x0a, 0x0f,
|
||||
0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12,
|
||||
0x3b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x23, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 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, 0x1f, 0x0a, 0x0b,
|
||||
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 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,
|
||||
0x22, 0xdb, 0x02, 0x0a, 0x0b, 0x50, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
|
||||
0x49, 0x64, 0x12, 0x20, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x64, 0x73,
|
||||
0x74, 0x50, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52,
|
||||
0x07, 0x64, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x69, 0x65, 0x63,
|
||||
0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x0b,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x25, 0x0a,
|
||||
0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65,
|
||||
0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6d, 0x64,
|
||||
0x35, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69,
|
||||
0x65, 0x63, 0x65, 0x4d, 0x64, 0x35, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x42, 0x0a, 0x10, 0x65, 0x78,
|
||||
0x74, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x09,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x78,
|
||||
0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0f, 0x65,
|
||||
0x78, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0xdc,
|
||||
0x02, 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, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92,
|
||||
0x01, 0x04, 0x08, 0x01, 0x28, 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, 0x12, 0x2d,
|
||||
0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x09,
|
||||
0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x28, 0x01,
|
||||
0x52, 0x0b, 0x6e, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2a, 0xd9, 0x05,
|
||||
0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50,
|
||||
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x07, 0x53, 0x75, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x10, 0xc8, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xf4, 0x03, 0x12,
|
||||
0x13, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61, 0x63, 0x6b, 0x65,
|
||||
0x64, 0x10, 0xe8, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x42, 0x61, 0x63, 0x6b, 0x54, 0x6f, 0x53, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xe9, 0x07, 0x12, 0x0f,
|
||||
0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xf8, 0x0a, 0x12,
|
||||
0x15, 0x0a, 0x10, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f,
|
||||
0x75, 0x6e, 0x64, 0x10, 0xfc, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77,
|
||||
0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x13, 0x0a, 0x0e, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x10, 0xe0, 0x0b, 0x12, 0x10,
|
||||
0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa0, 0x1f,
|
||||
0x12, 0x1b, 0x0a, 0x16, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xa1, 0x1f, 0x12, 0x1a, 0x0a,
|
||||
0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0xa2, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c,
|
||||
0x65, 0x64, 0x10, 0xa3, 0x1f, 0x12, 0x19, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x57,
|
||||
0x61, 0x69, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0xa4, 0x1f,
|
||||
0x12, 0x1c, 0x0a, 0x17, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x44,
|
||||
0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xa5, 0x1f, 0x12, 0x1b,
|
||||
0x0a, 0x16, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xa6, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45,
|
||||
0x72, 0x72, 0x6f, 0x72, 0x10, 0xa7, 0x1f, 0x12, 0x1a, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e,
|
||||
0x74, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72,
|
||||
0x10, 0xa8, 0x1f, 0x12, 0x18, 0x0a, 0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65,
|
||||
0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xb4, 0x22, 0x12, 0x0f, 0x0a,
|
||||
0x0a, 0x53, 0x63, 0x68, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x88, 0x27, 0x12, 0x18,
|
||||
0x0a, 0x13, 0x53, 0x63, 0x68, 0x65, 0x64, 0x4e, 0x65, 0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x53,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x10, 0x89, 0x27, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65,
|
||||
0x64, 0x50, 0x65, 0x65, 0x72, 0x47, 0x6f, 0x6e, 0x65, 0x10, 0x8a, 0x27, 0x12, 0x16, 0x0a, 0x11,
|
||||
0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e,
|
||||
0x64, 0x10, 0x8c, 0x27, 0x12, 0x23, 0x0a, 0x1e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65,
|
||||
0x72, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6f,
|
||||
0x72, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x10, 0x8d, 0x27, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x63, 0x68,
|
||||
0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f,
|
||||
0x72, 0x10, 0x8e, 0x27, 0x12, 0x14, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x72,
|
||||
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x10, 0x8f, 0x27, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x63,
|
||||
0x68, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10, 0x90, 0x27, 0x12,
|
||||
0x18, 0x0a, 0x13, 0x43, 0x44, 0x4e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
|
||||
0x72, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xf1, 0x2e, 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x44, 0x4e,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x84, 0x32, 0x12,
|
||||
0x18, 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xd9, 0x36, 0x2a, 0x17, 0x0a, 0x0a, 0x50, 0x69, 0x65,
|
||||
0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x4c, 0x41, 0x49, 0x4e,
|
||||
0x10, 0x00, 0x2a, 0x37, 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, 0x2a, 0x30, 0x0a, 0x08, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61,
|
||||
0x6c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x66, 0x43, 0x61, 0x63, 0x68, 0x65, 0x10, 0x01,
|
||||
0x12, 0x0b, 0x0a, 0x07, 0x44, 0x66, 0x53, 0x74, 0x6f, 0x72, 0x65, 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, 0x31, 0x3b, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -1187,11 +1272,11 @@ var file_pkg_apis_common_v1_common_proto_goTypes = []interface{}{
|
|||
(Priority)(0), // 4: common.Priority
|
||||
(*GrpcDfError)(nil), // 5: common.GrpcDfError
|
||||
(*UrlMeta)(nil), // 6: common.UrlMeta
|
||||
(*HostLoad)(nil), // 7: common.HostLoad
|
||||
(*PieceTaskRequest)(nil), // 8: common.PieceTaskRequest
|
||||
(*PieceInfo)(nil), // 9: common.PieceInfo
|
||||
(*ExtendAttribute)(nil), // 10: common.ExtendAttribute
|
||||
(*PiecePacket)(nil), // 11: common.PiecePacket
|
||||
(*PieceTaskRequest)(nil), // 7: common.PieceTaskRequest
|
||||
(*PieceInfo)(nil), // 8: common.PieceInfo
|
||||
(*ExtendAttribute)(nil), // 9: common.ExtendAttribute
|
||||
(*PiecePacket)(nil), // 10: common.PiecePacket
|
||||
(*Host)(nil), // 11: common.Host
|
||||
nil, // 12: common.UrlMeta.HeaderEntry
|
||||
nil, // 13: common.ExtendAttribute.HeaderEntry
|
||||
}
|
||||
|
@ -1201,8 +1286,8 @@ var file_pkg_apis_common_v1_common_proto_depIdxs = []int32{
|
|||
4, // 2: common.UrlMeta.priority:type_name -> common.Priority
|
||||
1, // 3: common.PieceInfo.piece_style:type_name -> common.PieceStyle
|
||||
13, // 4: common.ExtendAttribute.header:type_name -> common.ExtendAttribute.HeaderEntry
|
||||
9, // 5: common.PiecePacket.piece_infos:type_name -> common.PieceInfo
|
||||
10, // 6: common.PiecePacket.extend_attribute:type_name -> common.ExtendAttribute
|
||||
8, // 5: common.PiecePacket.piece_infos:type_name -> common.PieceInfo
|
||||
9, // 6: common.PiecePacket.extend_attribute:type_name -> common.ExtendAttribute
|
||||
7, // [7:7] is the sub-list for method output_type
|
||||
7, // [7:7] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
|
@ -1241,18 +1326,6 @@ func file_pkg_apis_common_v1_common_proto_init() {
|
|||
}
|
||||
}
|
||||
file_pkg_apis_common_v1_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*HostLoad); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_common_v1_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PieceTaskRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1264,7 +1337,7 @@ func file_pkg_apis_common_v1_common_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_common_v1_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_apis_common_v1_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PieceInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1276,7 +1349,7 @@ func file_pkg_apis_common_v1_common_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_common_v1_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_apis_common_v1_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ExtendAttribute); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1288,7 +1361,7 @@ func file_pkg_apis_common_v1_common_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_common_v1_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_apis_common_v1_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PiecePacket); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1300,6 +1373,18 @@ func file_pkg_apis_common_v1_common_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_common_v1_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Host); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
|
|
@ -280,138 +280,6 @@ var _UrlMeta_Digest_Pattern = regexp.MustCompile("^(md5)|(sha256):[A-Fa-f0-9]+$"
|
|||
|
||||
var _UrlMeta_Range_Pattern = regexp.MustCompile("^[0-9]+-[0-9]*$")
|
||||
|
||||
// Validate checks the field values on HostLoad 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 *HostLoad) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on HostLoad 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 HostLoadMultiError, or nil
|
||||
// if none found.
|
||||
func (m *HostLoad) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *HostLoad) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if val := m.GetCpuRatio(); val < 0 || val > 1 {
|
||||
err := HostLoadValidationError{
|
||||
field: "CpuRatio",
|
||||
reason: "value must be inside range [0, 1]",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if val := m.GetMemRatio(); val < 0 || val > 1 {
|
||||
err := HostLoadValidationError{
|
||||
field: "MemRatio",
|
||||
reason: "value must be inside range [0, 1]",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if val := m.GetDiskRatio(); val < 0 || val > 1 {
|
||||
err := HostLoadValidationError{
|
||||
field: "DiskRatio",
|
||||
reason: "value must be inside range [0, 1]",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return HostLoadMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// HostLoadMultiError is an error wrapping multiple validation errors returned
|
||||
// by HostLoad.ValidateAll() if the designated constraints aren't met.
|
||||
type HostLoadMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m HostLoadMultiError) 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 HostLoadMultiError) AllErrors() []error { return m }
|
||||
|
||||
// HostLoadValidationError is the validation error returned by
|
||||
// HostLoad.Validate if the designated constraints aren't met.
|
||||
type HostLoadValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e HostLoadValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e HostLoadValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e HostLoadValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e HostLoadValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e HostLoadValidationError) ErrorName() string { return "HostLoadValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e HostLoadValidationError) 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 %sHostLoad.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = HostLoadValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = HostLoadValidationError{}
|
||||
|
||||
// Validate checks the field values on PieceTaskRequest 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.
|
||||
|
@ -1037,3 +905,247 @@ var _ interface {
|
|||
Cause() error
|
||||
ErrorName() string
|
||||
} = PiecePacketValidationError{}
|
||||
|
||||
// Validate checks the field values on Host 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 *Host) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on Host 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 HostMultiError, or nil if none found.
|
||||
func (m *Host) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *Host) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if utf8.RuneCountInString(m.GetId()) < 1 {
|
||||
err := HostValidationError{
|
||||
field: "Id",
|
||||
reason: "value length must be at least 1 runes",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if utf8.RuneCountInString(m.GetIp()) < 1 {
|
||||
err := HostValidationError{
|
||||
field: "Ip",
|
||||
reason: "value length must be at least 1 runes",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
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 !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if val := m.GetPort(); val < 1024 || val >= 65535 {
|
||||
err := HostValidationError{
|
||||
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 := HostValidationError{
|
||||
field: "DownloadPort",
|
||||
reason: "value must be inside range [1024, 65535)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if m.GetSecurityDomain() != "" {
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(m.GetLocation()) > 0 {
|
||||
|
||||
if len(m.GetLocation()) < 1 {
|
||||
err := HostValidationError{
|
||||
field: "Location",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return 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 len(m.GetNetTopology()) > 0 {
|
||||
|
||||
if len(m.GetNetTopology()) < 1 {
|
||||
err := HostValidationError{
|
||||
field: "NetTopology",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return HostMultiError(errors)
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m HostMultiError) 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 HostMultiError) AllErrors() []error { return m }
|
||||
|
||||
// HostValidationError is the validation error returned by Host.Validate if the
|
||||
// designated constraints aren't met.
|
||||
type HostValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e HostValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e HostValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e HostValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e HostValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e HostValidationError) ErrorName() string { return "HostValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e HostValidationError) 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 %sHost.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = HostValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = HostValidationError{}
|
||||
|
|
|
@ -22,15 +22,16 @@ import "validate/validate.proto";
|
|||
|
||||
option go_package = "d7y.io/api/pkg/apis/common/v1;common";
|
||||
|
||||
// Code represents the code of the grpc api.
|
||||
enum Code {
|
||||
X_UNSPECIFIED = 0;
|
||||
// success code 200-299
|
||||
// Success code 200-299.
|
||||
Success = 200;
|
||||
// framework can not find server node
|
||||
// Framework can not find server node.
|
||||
ServerUnavailable = 500;
|
||||
|
||||
// common response error 1000-1999
|
||||
// client can be migrated to another scheduler/CDN
|
||||
// Common response error 1000-1999.
|
||||
// Client can be migrated to another scheduler/CDN.
|
||||
ResourceLacked = 1000;
|
||||
BackToSourceAborted = 1001;
|
||||
BadRequest = 1400;
|
||||
|
@ -38,51 +39,63 @@ enum Code {
|
|||
UnknownError = 1500;
|
||||
RequestTimeOut = 1504;
|
||||
|
||||
// client response error 4000-4999
|
||||
// Client response error 4000-4999.
|
||||
ClientError = 4000;
|
||||
ClientPieceRequestFail = 4001; // get piece task from other peer error
|
||||
ClientScheduleTimeout = 4002; // wait scheduler response timeout
|
||||
// Get piece task from other peer error.
|
||||
ClientPieceRequestFail = 4001;
|
||||
// Wait scheduler response timeout.
|
||||
ClientScheduleTimeout = 4002;
|
||||
ClientContextCanceled = 4003;
|
||||
ClientWaitPieceReady = 4004; // when target peer downloads from source slowly, should wait
|
||||
// When target peer downloads from source slowly, should wait.
|
||||
ClientWaitPieceReady = 4004;
|
||||
ClientPieceDownloadFail = 4005;
|
||||
ClientRequestLimitFail = 4006;
|
||||
ClientConnectionError = 4007;
|
||||
ClientBackSourceError = 4008;
|
||||
ClientPieceNotFound = 4404;
|
||||
|
||||
// scheduler response error 5000-5999
|
||||
// Scheduler response error 5000-5999.
|
||||
SchedError = 5000;
|
||||
SchedNeedBackSource = 5001; // client should try to download from source
|
||||
SchedPeerGone = 5002; // client should disconnect from scheduler
|
||||
SchedPeerNotFound = 5004; // peer not found in scheduler
|
||||
SchedPeerPieceResultReportFail = 5005; // report piece
|
||||
SchedTaskStatusError = 5006; // task status is fail
|
||||
SchedReregister = 5007; // task should be reregister
|
||||
SchedForbidden = 5008; // task should be forbidden
|
||||
// Client should try to download from source.
|
||||
SchedNeedBackSource = 5001;
|
||||
// Client should disconnect from scheduler.
|
||||
SchedPeerGone = 5002;
|
||||
// Peer not found in scheduler.
|
||||
SchedPeerNotFound = 5004;
|
||||
// Report piece.
|
||||
SchedPeerPieceResultReportFail = 5005;
|
||||
// Task status is fail.
|
||||
SchedTaskStatusError = 5006;
|
||||
// Task should be reregister.
|
||||
SchedReregister = 5007;
|
||||
// Task should be forbidden.
|
||||
SchedForbidden = 5008;
|
||||
|
||||
// cdnsystem response error 6000-6999
|
||||
// CDN system response error 6000-6999.
|
||||
CDNTaskRegistryFail = 6001;
|
||||
CDNTaskNotFound = 6404;
|
||||
|
||||
// manager response error 7000-7999
|
||||
// Manager response error 7000-7999.
|
||||
InvalidResourceType = 7001;
|
||||
}
|
||||
|
||||
// PieceStyle represents the style of piece.
|
||||
enum PieceStyle {
|
||||
PLAIN = 0;
|
||||
}
|
||||
|
||||
// SizeScope represents size scope of task.
|
||||
enum SizeScope {
|
||||
// size > one piece size
|
||||
// size > one piece size.
|
||||
NORMAL = 0;
|
||||
|
||||
// 128 byte < size <= one piece size and be plain type
|
||||
// 128 byte < size <= one piece size and be plain type.
|
||||
SMALL = 1;
|
||||
|
||||
// size <= 128 byte and be plain type
|
||||
// size <= 128 byte and be plain type.
|
||||
TINY = 2;
|
||||
|
||||
// size == 0 byte and be plain type
|
||||
// size == 0 byte and be plain type.
|
||||
EMPTY = 3;
|
||||
}
|
||||
|
||||
|
@ -138,6 +151,7 @@ enum Priority {
|
|||
LEVEL6 = 6;
|
||||
}
|
||||
|
||||
// GrpcDfError represents error of the grpc.
|
||||
message GrpcDfError {
|
||||
Code code = 1;
|
||||
string message = 2;
|
||||
|
@ -145,74 +159,91 @@ message GrpcDfError {
|
|||
|
||||
// UrlMeta describes url meta info.
|
||||
message UrlMeta {
|
||||
// digest checks integrity of url content, for example md5:xxx or sha256:yyy
|
||||
// Digest checks integrity of url content, for example md5:xxx or sha256:yyy.
|
||||
string digest = 1 [(validate.rules).string = {pattern: "^(md5)|(sha256):[A-Fa-f0-9]+$", ignore_empty:true}];
|
||||
// url tag identifies different task for same url, conflict with digest
|
||||
// URL tag identifies different task for same url, conflict with digest.
|
||||
string tag = 2;
|
||||
// content range for url
|
||||
// Content range for url.
|
||||
string range = 3 [(validate.rules).string = {pattern: "^[0-9]+-[0-9]*$", ignore_empty:true}];
|
||||
// filter url used to generate task id
|
||||
// Filter url used to generate task id.
|
||||
string filter = 4;
|
||||
// other url header infos
|
||||
// Other url header infos.
|
||||
map<string, string> header = 5;
|
||||
// application
|
||||
// Application.
|
||||
string application = 6;
|
||||
// priority
|
||||
// Priority.
|
||||
Priority priority = 7;
|
||||
}
|
||||
|
||||
message HostLoad {
|
||||
// cpu usage
|
||||
float cpu_ratio = 1 [(validate.rules).float = {gte: 0, lte: 1}];
|
||||
// memory usage
|
||||
float mem_ratio = 2 [(validate.rules).float = {gte: 0, lte: 1}];
|
||||
// disk space usage
|
||||
float disk_ratio = 3 [(validate.rules).float = {gte: 0, lte: 1}];
|
||||
}
|
||||
|
||||
// PieceTaskRequest represents request of PieceTask.
|
||||
message PieceTaskRequest {
|
||||
string task_id = 1 [(validate.rules).string.min_len = 1];
|
||||
string src_pid = 2 [(validate.rules).string.min_len = 1];
|
||||
string dst_pid = 3 [(validate.rules).string.min_len = 1];
|
||||
// piece number
|
||||
// Piece number.
|
||||
uint32 start_num = 4 [(validate.rules).uint32.gte = 0];
|
||||
// expected piece count, limit = 0 represent request pieces as many shards as possible
|
||||
// Expected piece count, limit = 0 represent request pieces as many shards as possible.
|
||||
uint32 limit = 5 [(validate.rules).uint32.gte = 0];
|
||||
}
|
||||
|
||||
// Piece metadata.
|
||||
message PieceInfo {
|
||||
// piece_num < 0 represent start report piece flag
|
||||
// If piece_num is less than zero, it means to start report piece flag.
|
||||
int32 piece_num = 1;
|
||||
uint64 range_start = 2 [(validate.rules).uint64.gte = 0];
|
||||
uint32 range_size = 3 [(validate.rules).uint32.gte = 0];
|
||||
string piece_md5 = 4 [(validate.rules).string = {pattern:"([a-f\\d]{32}|[A-F\\d]{32}|[a-f\\d]{16}|[A-F\\d]{16})", ignore_empty:true}];
|
||||
uint64 piece_offset = 5 [(validate.rules).uint64.gte = 0];
|
||||
PieceStyle piece_style = 6;
|
||||
// total time(millisecond) consumed
|
||||
// Cost of the downloading.
|
||||
uint64 download_cost = 7 [(validate.rules).uint64.gte = 0];
|
||||
}
|
||||
|
||||
// ExtendAttribute is extend attribute.
|
||||
message ExtendAttribute {
|
||||
// task response header, eg: HTTP Response Header
|
||||
// Task response header, eg: HTTP Response Header.
|
||||
map<string, string> header = 1;
|
||||
// task response code, eg: HTTP Status Code
|
||||
// Task response code, eg: HTTP Status Code.
|
||||
int32 status_code = 2;
|
||||
// task response status, eg: HTTP Status
|
||||
// Task response status, eg: HTTP Status.
|
||||
string status = 3;
|
||||
}
|
||||
|
||||
// Piece metadata.
|
||||
message PiecePacket {
|
||||
string task_id = 2 [(validate.rules).string.min_len = 1];
|
||||
string dst_pid = 3 [(validate.rules).string.min_len = 1];
|
||||
// ip:port
|
||||
// Address of the remote peer.
|
||||
string dst_addr = 4 [(validate.rules).string.min_len = 1];
|
||||
repeated PieceInfo piece_infos = 5;
|
||||
// total piece count for url, total_piece represent total piece is unknown
|
||||
// Total piece count for url, total_piece represent total piece is unknown.
|
||||
int32 total_piece = 6;
|
||||
// content_length < 0 represent content length is unknown
|
||||
// If content_length is less than zero, it means content length is unknown.
|
||||
int64 content_length = 7;
|
||||
// sha256 code of all piece md5
|
||||
// Sha256 code of all piece md5.
|
||||
string piece_md5_sign = 8;
|
||||
// task extend attribute
|
||||
// Task extend attribute.
|
||||
ExtendAttribute extend_attribute = 9;
|
||||
}
|
||||
|
||||
// Host metadata.
|
||||
message Host {
|
||||
// Host id.
|
||||
string id = 1 [(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];
|
||||
// Port of grpc service.
|
||||
int32 port = 4 [(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(area, country, province, city, etc.).
|
||||
repeated string location = 7 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
// IDC where the peer host is located.
|
||||
string idc = 8 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
|
||||
// Network topology(switch, router, etc.).
|
||||
repeated string net_topology = 9 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
}
|
||||
|
|
|
@ -536,24 +536,22 @@ type Host struct {
|
|||
|
||||
// Host id.
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// Host ipv4.
|
||||
Ipv4 string `protobuf:"bytes,2,opt,name=ipv4,proto3" json:"ipv4,omitempty"`
|
||||
// Host ipv6.
|
||||
Ipv6 string `protobuf:"bytes,3,opt,name=ipv6,proto3" json:"ipv6,omitempty"`
|
||||
// Host ip.
|
||||
Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
|
||||
// Peer hostname.
|
||||
Hostname string `protobuf:"bytes,4,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||||
Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||||
// Port of grpc service.
|
||||
Port int32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"`
|
||||
Port int32 `protobuf:"varint,4,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"`
|
||||
DownloadPort int32 `protobuf:"varint,5,opt,name=download_port,json=downloadPort,proto3" json:"download_port,omitempty"`
|
||||
// Security domain for network.
|
||||
SecurityDomain string `protobuf:"bytes,7,opt,name=security_domain,json=securityDomain,proto3" json:"security_domain,omitempty"`
|
||||
SecurityDomain string `protobuf:"bytes,6,opt,name=security_domain,json=securityDomain,proto3" json:"security_domain,omitempty"`
|
||||
// Host location(area, country, province, city, etc.).
|
||||
Location []string `protobuf:"bytes,8,rep,name=location,proto3" json:"location,omitempty"`
|
||||
Location []string `protobuf:"bytes,7,rep,name=location,proto3" json:"location,omitempty"`
|
||||
// IDC where the peer host is located.
|
||||
Idc string `protobuf:"bytes,9,opt,name=idc,proto3" json:"idc,omitempty"`
|
||||
Idc string `protobuf:"bytes,8,opt,name=idc,proto3" json:"idc,omitempty"`
|
||||
// Network topology(switch, router, etc.).
|
||||
NetTopology []string `protobuf:"bytes,10,rep,name=net_topology,json=netTopology,proto3" json:"net_topology,omitempty"`
|
||||
NetTopology []string `protobuf:"bytes,9,rep,name=net_topology,json=netTopology,proto3" json:"net_topology,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Host) Reset() {
|
||||
|
@ -595,16 +593,9 @@ func (x *Host) GetId() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *Host) GetIpv4() string {
|
||||
func (x *Host) GetIp() string {
|
||||
if x != nil {
|
||||
return x.Ipv4
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Host) GetIpv6() string {
|
||||
if x != nil {
|
||||
return x.Ipv6
|
||||
return x.Ip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -1093,123 +1084,121 @@ var file_pkg_apis_common_v2_common_proto_rawDesc = []byte{
|
|||
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, 0x84, 0x03, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69,
|
||||
0x41, 0x74, 0x22, 0xdc, 0x02, 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, 0x1e, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x78, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x04,
|
||||
0x69, 0x70, 0x76, 0x34, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x80, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52,
|
||||
0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x23, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x04, 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, 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,
|
||||
0x33, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x6f, 0x6d, 0x61,
|
||||
0x69, 0x6e, 0x18, 0x07, 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, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01,
|
||||
0x28, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x03,
|
||||
0x69, 0x64, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05,
|
||||
0x10, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x2d, 0x0a, 0x0c, 0x6e, 0x65,
|
||||
0x74, 0x5f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09,
|
||||
0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x6e, 0x65,
|
||||
0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x22, 0x2f, 0x0a, 0x05, 0x52, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xe7, 0x03, 0x0a, 0x08, 0x4d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 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, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x48, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x12, 0x26, 0x0a, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,
|
||||
0x0a, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x09,
|
||||
0x70, 0x69, 0x65, 0x63, 0x65, 0x53, 0x69, 0x7a, 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, 0x89, 0x03, 0x0a, 0x05, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x1f,
|
||||
0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07,
|
||||
0xfa, 0x42, 0x04, 0x2a, 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, 0x1b, 0x0a, 0x04, 0x73, 0x69, 0x7a,
|
||||
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00,
|
||||
0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 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, 0x37, 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, 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,
|
||||
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, 0x03, 0x28, 0x09, 0x42, 0x0a,
|
||||
0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x28, 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, 0x12, 0x2d, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f,
|
||||
0x67, 0x79, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04,
|
||||
0x08, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67,
|
||||
0x79, 0x22, 0x2f, 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65,
|
||||
0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x65,
|
||||
0x6e, 0x64, 0x22, 0xe7, 0x03, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 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, 0x4d, 0x65, 0x74,
|
||||
0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0a, 0x70, 0x69, 0x65,
|
||||
0x63, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa,
|
||||
0x42, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x09, 0x70, 0x69, 0x65, 0x63, 0x65, 0x53, 0x69, 0x7a,
|
||||
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, 0x89, 0x03, 0x0a,
|
||||
0x05, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 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, 0x1b, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42,
|
||||
0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 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, 0x37, 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, 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 (
|
||||
|
|
|
@ -613,12 +613,10 @@ func (m *Host) validate(all bool) error {
|
|||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if m.GetIpv4() != "" {
|
||||
|
||||
if ip := net.ParseIP(m.GetIpv4()); ip == nil || ip.To4() == nil {
|
||||
if utf8.RuneCountInString(m.GetIp()) < 1 {
|
||||
err := HostValidationError{
|
||||
field: "Ipv4",
|
||||
reason: "value must be a valid IPv4 address",
|
||||
field: "Ip",
|
||||
reason: "value length must be at least 1 runes",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
|
@ -626,23 +624,6 @@ func (m *Host) validate(all bool) error {
|
|||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if m.GetIpv6() != "" {
|
||||
|
||||
if ip := net.ParseIP(m.GetIpv6()); ip == nil || ip.To4() != nil {
|
||||
err := HostValidationError{
|
||||
field: "Ipv6",
|
||||
reason: "value must be a valid IPv6 address",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if err := m._validateHostname(m.GetHostname()); err != nil {
|
||||
err = HostValidationError{
|
||||
field: "Hostname",
|
||||
|
|
|
@ -151,24 +151,22 @@ message Task {
|
|||
message Host {
|
||||
// Host id.
|
||||
string id = 1 [(validate.rules).string.min_len = 1];
|
||||
// Host ipv4.
|
||||
string ipv4 = 2 [(validate.rules).string = {ipv4: true, ignore_empty: true}];
|
||||
// Host ipv6.
|
||||
string ipv6 = 3 [(validate.rules).string = {ipv6: true, ignore_empty: true}];
|
||||
// Host ip.
|
||||
string ip = 2 [(validate.rules).string.min_len = 1];
|
||||
// Peer hostname.
|
||||
string hostname = 4 [(validate.rules).string.hostname = true];
|
||||
string hostname = 3 [(validate.rules).string.hostname = true];
|
||||
// Port of grpc service.
|
||||
int32 port = 5 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
|
||||
int32 port = 4 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
|
||||
// Port of download server.
|
||||
int32 download_port = 6 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
|
||||
int32 download_port = 5 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
|
||||
// Security domain for network.
|
||||
string security_domain = 7 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
|
||||
string security_domain = 6 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
|
||||
// Host location(area, country, province, city, etc.).
|
||||
repeated string location = 8 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
repeated string location = 7 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
// IDC where the peer host is located.
|
||||
string idc = 9 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
|
||||
string idc = 8 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
|
||||
// Network topology(switch, router, etc.).
|
||||
repeated string net_topology = 10 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
repeated string net_topology = 9 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
}
|
||||
|
||||
// Range represents download range.
|
||||
|
|
|
@ -198,6 +198,26 @@ func (mr *MockSchedulerClientMockRecorder) StatTask(ctx, in interface{}, opts ..
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockSchedulerClient)(nil).StatTask), varargs...)
|
||||
}
|
||||
|
||||
// SyncProbes mocks base method.
|
||||
func (m *MockSchedulerClient) SyncProbes(ctx context.Context, opts ...grpc.CallOption) (scheduler.Scheduler_SyncProbesClient, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{ctx}
|
||||
for _, a := range opts {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SyncProbes", varargs...)
|
||||
ret0, _ := ret[0].(scheduler.Scheduler_SyncProbesClient)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// SyncProbes indicates an expected call of SyncProbes.
|
||||
func (mr *MockSchedulerClientMockRecorder) SyncProbes(ctx interface{}, opts ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{ctx}, opts...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncProbes", reflect.TypeOf((*MockSchedulerClient)(nil).SyncProbes), varargs...)
|
||||
}
|
||||
|
||||
// MockScheduler_ReportPieceResultClient is a mock of Scheduler_ReportPieceResultClient interface.
|
||||
type MockScheduler_ReportPieceResultClient struct {
|
||||
ctrl *gomock.Controller
|
||||
|
@ -335,6 +355,143 @@ func (mr *MockScheduler_ReportPieceResultClientMockRecorder) Trailer() *gomock.C
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_ReportPieceResultClient)(nil).Trailer))
|
||||
}
|
||||
|
||||
// MockScheduler_SyncProbesClient is a mock of Scheduler_SyncProbesClient interface.
|
||||
type MockScheduler_SyncProbesClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockScheduler_SyncProbesClientMockRecorder
|
||||
}
|
||||
|
||||
// MockScheduler_SyncProbesClientMockRecorder is the mock recorder for MockScheduler_SyncProbesClient.
|
||||
type MockScheduler_SyncProbesClientMockRecorder struct {
|
||||
mock *MockScheduler_SyncProbesClient
|
||||
}
|
||||
|
||||
// NewMockScheduler_SyncProbesClient creates a new mock instance.
|
||||
func NewMockScheduler_SyncProbesClient(ctrl *gomock.Controller) *MockScheduler_SyncProbesClient {
|
||||
mock := &MockScheduler_SyncProbesClient{ctrl: ctrl}
|
||||
mock.recorder = &MockScheduler_SyncProbesClientMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockScheduler_SyncProbesClient) EXPECT() *MockScheduler_SyncProbesClientMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// CloseSend mocks base method.
|
||||
func (m *MockScheduler_SyncProbesClient) CloseSend() error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CloseSend")
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// CloseSend indicates an expected call of CloseSend.
|
||||
func (mr *MockScheduler_SyncProbesClientMockRecorder) CloseSend() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).CloseSend))
|
||||
}
|
||||
|
||||
// Context mocks base method.
|
||||
func (m *MockScheduler_SyncProbesClient) Context() context.Context {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Context")
|
||||
ret0, _ := ret[0].(context.Context)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Context indicates an expected call of Context.
|
||||
func (mr *MockScheduler_SyncProbesClientMockRecorder) Context() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).Context))
|
||||
}
|
||||
|
||||
// Header mocks base method.
|
||||
func (m *MockScheduler_SyncProbesClient) Header() (metadata.MD, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Header")
|
||||
ret0, _ := ret[0].(metadata.MD)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Header indicates an expected call of Header.
|
||||
func (mr *MockScheduler_SyncProbesClientMockRecorder) Header() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).Header))
|
||||
}
|
||||
|
||||
// Recv mocks base method.
|
||||
func (m *MockScheduler_SyncProbesClient) Recv() (*scheduler.SyncProbesResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Recv")
|
||||
ret0, _ := ret[0].(*scheduler.SyncProbesResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Recv indicates an expected call of Recv.
|
||||
func (mr *MockScheduler_SyncProbesClientMockRecorder) Recv() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).Recv))
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncProbesClient) RecvMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockScheduler_SyncProbesClientMockRecorder) RecvMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).RecvMsg), m)
|
||||
}
|
||||
|
||||
// Send mocks base method.
|
||||
func (m *MockScheduler_SyncProbesClient) Send(arg0 *scheduler.SyncProbesRequest) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Send", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Send indicates an expected call of Send.
|
||||
func (mr *MockScheduler_SyncProbesClientMockRecorder) Send(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).Send), arg0)
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncProbesClient) SendMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockScheduler_SyncProbesClientMockRecorder) SendMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).SendMsg), m)
|
||||
}
|
||||
|
||||
// Trailer mocks base method.
|
||||
func (m *MockScheduler_SyncProbesClient) Trailer() metadata.MD {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Trailer")
|
||||
ret0, _ := ret[0].(metadata.MD)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Trailer indicates an expected call of Trailer.
|
||||
func (mr *MockScheduler_SyncProbesClientMockRecorder) Trailer() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).Trailer))
|
||||
}
|
||||
|
||||
// MockSchedulerServer is a mock of SchedulerServer interface.
|
||||
type MockSchedulerServer struct {
|
||||
ctrl *gomock.Controller
|
||||
|
@ -477,6 +634,20 @@ func (mr *MockSchedulerServerMockRecorder) StatTask(arg0, arg1 interface{}) *gom
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockSchedulerServer)(nil).StatTask), arg0, arg1)
|
||||
}
|
||||
|
||||
// SyncProbes mocks base method.
|
||||
func (m *MockSchedulerServer) SyncProbes(arg0 scheduler.Scheduler_SyncProbesServer) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SyncProbes", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SyncProbes indicates an expected call of SyncProbes.
|
||||
func (mr *MockSchedulerServerMockRecorder) SyncProbes(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncProbes", reflect.TypeOf((*MockSchedulerServer)(nil).SyncProbes), arg0)
|
||||
}
|
||||
|
||||
// MockUnsafeSchedulerServer is a mock of UnsafeSchedulerServer interface.
|
||||
type MockUnsafeSchedulerServer struct {
|
||||
ctrl *gomock.Controller
|
||||
|
@ -645,3 +816,137 @@ func (mr *MockScheduler_ReportPieceResultServerMockRecorder) SetTrailer(arg0 int
|
|||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_ReportPieceResultServer)(nil).SetTrailer), arg0)
|
||||
}
|
||||
|
||||
// MockScheduler_SyncProbesServer is a mock of Scheduler_SyncProbesServer interface.
|
||||
type MockScheduler_SyncProbesServer struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockScheduler_SyncProbesServerMockRecorder
|
||||
}
|
||||
|
||||
// MockScheduler_SyncProbesServerMockRecorder is the mock recorder for MockScheduler_SyncProbesServer.
|
||||
type MockScheduler_SyncProbesServerMockRecorder struct {
|
||||
mock *MockScheduler_SyncProbesServer
|
||||
}
|
||||
|
||||
// NewMockScheduler_SyncProbesServer creates a new mock instance.
|
||||
func NewMockScheduler_SyncProbesServer(ctrl *gomock.Controller) *MockScheduler_SyncProbesServer {
|
||||
mock := &MockScheduler_SyncProbesServer{ctrl: ctrl}
|
||||
mock.recorder = &MockScheduler_SyncProbesServerMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockScheduler_SyncProbesServer) EXPECT() *MockScheduler_SyncProbesServerMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// Context mocks base method.
|
||||
func (m *MockScheduler_SyncProbesServer) Context() context.Context {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Context")
|
||||
ret0, _ := ret[0].(context.Context)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Context indicates an expected call of Context.
|
||||
func (mr *MockScheduler_SyncProbesServerMockRecorder) Context() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).Context))
|
||||
}
|
||||
|
||||
// Recv mocks base method.
|
||||
func (m *MockScheduler_SyncProbesServer) Recv() (*scheduler.SyncProbesRequest, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Recv")
|
||||
ret0, _ := ret[0].(*scheduler.SyncProbesRequest)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Recv indicates an expected call of Recv.
|
||||
func (mr *MockScheduler_SyncProbesServerMockRecorder) Recv() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).Recv))
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncProbesServer) RecvMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockScheduler_SyncProbesServerMockRecorder) RecvMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).RecvMsg), m)
|
||||
}
|
||||
|
||||
// Send mocks base method.
|
||||
func (m *MockScheduler_SyncProbesServer) Send(arg0 *scheduler.SyncProbesResponse) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Send", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Send indicates an expected call of Send.
|
||||
func (mr *MockScheduler_SyncProbesServerMockRecorder) Send(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).Send), arg0)
|
||||
}
|
||||
|
||||
// SendHeader mocks base method.
|
||||
func (m *MockScheduler_SyncProbesServer) SendHeader(arg0 metadata.MD) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendHeader", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendHeader indicates an expected call of SendHeader.
|
||||
func (mr *MockScheduler_SyncProbesServerMockRecorder) SendHeader(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).SendHeader), arg0)
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncProbesServer) SendMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockScheduler_SyncProbesServerMockRecorder) SendMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).SendMsg), m)
|
||||
}
|
||||
|
||||
// SetHeader mocks base method.
|
||||
func (m *MockScheduler_SyncProbesServer) SetHeader(arg0 metadata.MD) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetHeader", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetHeader indicates an expected call of SetHeader.
|
||||
func (mr *MockScheduler_SyncProbesServerMockRecorder) SetHeader(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).SetHeader), arg0)
|
||||
}
|
||||
|
||||
// SetTrailer mocks base method.
|
||||
func (m *MockScheduler_SyncProbesServer) SetTrailer(arg0 metadata.MD) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "SetTrailer", arg0)
|
||||
}
|
||||
|
||||
// SetTrailer indicates an expected call of SetTrailer.
|
||||
func (mr *MockScheduler_SyncProbesServerMockRecorder) SetTrailer(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).SetTrailer), arg0)
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -162,35 +162,6 @@ func (m *PeerTaskRequest) validate(all bool) error {
|
|||
}
|
||||
}
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetHostLoad()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, PeerTaskRequestValidationError{
|
||||
field: "HostLoad",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, PeerTaskRequestValidationError{
|
||||
field: "HostLoad",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetHostLoad()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return PeerTaskRequestValidationError{
|
||||
field: "HostLoad",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// no validation rules for IsMigrating
|
||||
|
||||
// no validation rules for TaskId
|
||||
|
@ -901,35 +872,6 @@ func (m *PieceResult) validate(all bool) error {
|
|||
|
||||
// no validation rules for Code
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetHostLoad()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, PieceResultValidationError{
|
||||
field: "HostLoad",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, PieceResultValidationError{
|
||||
field: "HostLoad",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetHostLoad()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return PieceResultValidationError{
|
||||
field: "HostLoad",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// no validation rules for FinishedCount
|
||||
|
||||
if all {
|
||||
|
@ -3497,6 +3439,586 @@ var _ interface {
|
|||
ErrorName() string
|
||||
} = BuildValidationError{}
|
||||
|
||||
// Validate checks the field values on Probe 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 *Probe) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on Probe 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 ProbeMultiError, or nil if none found.
|
||||
func (m *Probe) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *Probe) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if m.GetHost() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "Host",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetHost()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, ProbeValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, ProbeValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return ProbeValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(m.GetRtts()) < 1 {
|
||||
err := ProbeValidationError{
|
||||
field: "Rtts",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetRtts() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, ProbeValidationError{
|
||||
field: fmt.Sprintf("Rtts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, ProbeValidationError{
|
||||
field: fmt.Sprintf("Rtts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return ProbeValidationError{
|
||||
field: fmt.Sprintf("Rtts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if m.GetMinRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "MinRtt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if m.GetMaxRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "MaxRtt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if m.GetAvgRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "AvgRtt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if m.GetUpdatedAt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "UpdatedAt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return ProbeMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ProbeMultiError is an error wrapping multiple validation errors returned by
|
||||
// Probe.ValidateAll() if the designated constraints aren't met.
|
||||
type ProbeMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m ProbeMultiError) 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 ProbeMultiError) AllErrors() []error { return m }
|
||||
|
||||
// ProbeValidationError is the validation error returned by Probe.Validate if
|
||||
// the designated constraints aren't met.
|
||||
type ProbeValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e ProbeValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e ProbeValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e ProbeValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e ProbeValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e ProbeValidationError) ErrorName() string { return "ProbeValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e ProbeValidationError) 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 %sProbe.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = ProbeValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = ProbeValidationError{}
|
||||
|
||||
// Validate checks the field values on SyncProbesRequest 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 *SyncProbesRequest) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on SyncProbesRequest 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
|
||||
// SyncProbesRequestMultiError, or nil if none found.
|
||||
func (m *SyncProbesRequest) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *SyncProbesRequest) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if m.GetHost() == nil {
|
||||
err := SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetHost()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(m.GetProbes()) > 0 {
|
||||
|
||||
if len(m.GetProbes()) < 1 {
|
||||
err := SyncProbesRequestValidationError{
|
||||
field: "Probes",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetProbes() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncProbesRequestValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return SyncProbesRequestMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SyncProbesRequestMultiError is an error wrapping multiple validation errors
|
||||
// returned by SyncProbesRequest.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type SyncProbesRequestMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m SyncProbesRequestMultiError) 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 SyncProbesRequestMultiError) AllErrors() []error { return m }
|
||||
|
||||
// SyncProbesRequestValidationError is the validation error returned by
|
||||
// SyncProbesRequest.Validate if the designated constraints aren't met.
|
||||
type SyncProbesRequestValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e SyncProbesRequestValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e SyncProbesRequestValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e SyncProbesRequestValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e SyncProbesRequestValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e SyncProbesRequestValidationError) ErrorName() string {
|
||||
return "SyncProbesRequestValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e SyncProbesRequestValidationError) 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 %sSyncProbesRequest.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = SyncProbesRequestValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = SyncProbesRequestValidationError{}
|
||||
|
||||
// Validate checks the field values on SyncProbesResponse 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 *SyncProbesResponse) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on SyncProbesResponse 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
|
||||
// SyncProbesResponseMultiError, or nil if none found.
|
||||
func (m *SyncProbesResponse) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *SyncProbesResponse) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if len(m.GetHosts()) > 0 {
|
||||
|
||||
if len(m.GetHosts()) < 1 {
|
||||
err := SyncProbesResponseValidationError{
|
||||
field: "Hosts",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetHosts() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncProbesResponseValidationError{
|
||||
field: fmt.Sprintf("Hosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncProbesResponseValidationError{
|
||||
field: fmt.Sprintf("Hosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncProbesResponseValidationError{
|
||||
field: fmt.Sprintf("Hosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if m.GetProbeInterval() == nil {
|
||||
err := SyncProbesResponseValidationError{
|
||||
field: "ProbeInterval",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return SyncProbesResponseMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SyncProbesResponseMultiError is an error wrapping multiple validation errors
|
||||
// returned by SyncProbesResponse.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type SyncProbesResponseMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m SyncProbesResponseMultiError) 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 SyncProbesResponseMultiError) AllErrors() []error { return m }
|
||||
|
||||
// SyncProbesResponseValidationError is the validation error returned by
|
||||
// SyncProbesResponse.Validate if the designated constraints aren't met.
|
||||
type SyncProbesResponseValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e SyncProbesResponseValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e SyncProbesResponseValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e SyncProbesResponseValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e SyncProbesResponseValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e SyncProbesResponseValidationError) ErrorName() string {
|
||||
return "SyncProbesResponseValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e SyncProbesResponseValidationError) 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 %sSyncProbesResponse.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = SyncProbesResponseValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = SyncProbesResponseValidationError{}
|
||||
|
||||
// Validate checks the field values on PeerPacket_DestPeer with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
|
|
|
@ -22,6 +22,8 @@ import "pkg/apis/common/v1/common.proto";
|
|||
import "pkg/apis/errordetails/v1/errordetails.proto";
|
||||
import "validate/validate.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "d7y.io/api/pkg/apis/scheduler/v1;scheduler";
|
||||
|
||||
|
@ -35,8 +37,6 @@ message PeerTaskRequest{
|
|||
string peer_id = 3 [(validate.rules).string.min_len = 1];
|
||||
// Peer host info.
|
||||
PeerHost peer_host = 4;
|
||||
// Peer host load.
|
||||
common.HostLoad host_load = 5;
|
||||
// Whether this request is caused by migration.
|
||||
bool is_migrating = 6;
|
||||
// Task id.
|
||||
|
@ -113,8 +113,6 @@ message PieceResult{
|
|||
bool success = 7;
|
||||
// Result code.
|
||||
common.Code code = 8;
|
||||
// Peer host load.
|
||||
common.HostLoad host_load = 9;
|
||||
// Finished count.
|
||||
int32 finished_count = 10;
|
||||
// Task extend attribute,
|
||||
|
@ -378,6 +376,38 @@ message Build {
|
|||
string platform = 4;
|
||||
}
|
||||
|
||||
// Probe information.
|
||||
message Probe {
|
||||
// Host metadata.
|
||||
common.Host host = 1 [(validate.rules).message.required = true];
|
||||
// RTTs is all of the round-trip times sent via this pinger.
|
||||
repeated google.protobuf.Duration rtts = 2 [(validate.rules).repeated = {min_items: 1}];
|
||||
// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration min_rtt = 3 [(validate.rules).duration.required = true];
|
||||
// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration max_rtt = 4 [(validate.rules).duration.required = true];
|
||||
// AvgRTT is the average round-trip time sent via this pinger.
|
||||
google.protobuf.Duration avg_rtt = 5 [(validate.rules).duration.required = true];
|
||||
// Task update time.
|
||||
google.protobuf.Timestamp updated_at = 6 [(validate.rules).timestamp.required = true];
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncProbesRequest {
|
||||
// Host metadata.
|
||||
common.Host host = 1 [(validate.rules).message.required = true];
|
||||
// Probes information.
|
||||
repeated Probe probes = 2 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
}
|
||||
|
||||
// SyncProbesResponse represents response of SyncProbes.
|
||||
message SyncProbesResponse {
|
||||
// Hosts needs to be probed.
|
||||
repeated common.Host hosts = 1 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
// Probe interval.
|
||||
google.protobuf.Duration probe_interval = 2 [(validate.rules).duration.required = true];
|
||||
}
|
||||
|
||||
// Scheduler RPC Service.
|
||||
service Scheduler{
|
||||
// RegisterPeerTask registers a peer into task.
|
||||
|
@ -403,4 +433,7 @@ service Scheduler{
|
|||
|
||||
// LeaveHost makes the peers leaving from host.
|
||||
rpc LeaveHost(LeaveHostRequest)returns(google.protobuf.Empty);
|
||||
|
||||
// SyncProbes sync probes of the host.
|
||||
rpc SyncProbes(stream SyncProbesRequest)returns(stream SyncProbesResponse);
|
||||
}
|
||||
|
|
|
@ -39,6 +39,8 @@ type SchedulerClient interface {
|
|||
AnnounceHost(ctx context.Context, in *AnnounceHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// LeaveHost makes the peers leaving from host.
|
||||
LeaveHost(ctx context.Context, in *LeaveHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// SyncProbes sync probes of the host.
|
||||
SyncProbes(ctx context.Context, opts ...grpc.CallOption) (Scheduler_SyncProbesClient, error)
|
||||
}
|
||||
|
||||
type schedulerClient struct {
|
||||
|
@ -143,6 +145,37 @@ func (c *schedulerClient) LeaveHost(ctx context.Context, in *LeaveHostRequest, o
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *schedulerClient) SyncProbes(ctx context.Context, opts ...grpc.CallOption) (Scheduler_SyncProbesClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[1], "/scheduler.Scheduler/SyncProbes", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &schedulerSyncProbesClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Scheduler_SyncProbesClient interface {
|
||||
Send(*SyncProbesRequest) error
|
||||
Recv() (*SyncProbesResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type schedulerSyncProbesClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *schedulerSyncProbesClient) Send(m *SyncProbesRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *schedulerSyncProbesClient) Recv() (*SyncProbesResponse, error) {
|
||||
m := new(SyncProbesResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// SchedulerServer is the server API for Scheduler service.
|
||||
// All implementations should embed UnimplementedSchedulerServer
|
||||
// for forward compatibility
|
||||
|
@ -163,6 +196,8 @@ type SchedulerServer interface {
|
|||
AnnounceHost(context.Context, *AnnounceHostRequest) (*emptypb.Empty, error)
|
||||
// LeaveHost makes the peers leaving from host.
|
||||
LeaveHost(context.Context, *LeaveHostRequest) (*emptypb.Empty, error)
|
||||
// SyncProbes sync probes of the host.
|
||||
SyncProbes(Scheduler_SyncProbesServer) error
|
||||
}
|
||||
|
||||
// UnimplementedSchedulerServer should be embedded to have forward compatible implementations.
|
||||
|
@ -193,6 +228,9 @@ func (UnimplementedSchedulerServer) AnnounceHost(context.Context, *AnnounceHostR
|
|||
func (UnimplementedSchedulerServer) LeaveHost(context.Context, *LeaveHostRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LeaveHost not implemented")
|
||||
}
|
||||
func (UnimplementedSchedulerServer) SyncProbes(Scheduler_SyncProbesServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SyncProbes not implemented")
|
||||
}
|
||||
|
||||
// UnsafeSchedulerServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SchedulerServer will
|
||||
|
@ -357,6 +395,32 @@ func _Scheduler_LeaveHost_Handler(srv interface{}, ctx context.Context, dec func
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Scheduler_SyncProbes_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SchedulerServer).SyncProbes(&schedulerSyncProbesServer{stream})
|
||||
}
|
||||
|
||||
type Scheduler_SyncProbesServer interface {
|
||||
Send(*SyncProbesResponse) error
|
||||
Recv() (*SyncProbesRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type schedulerSyncProbesServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *schedulerSyncProbesServer) Send(m *SyncProbesResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *schedulerSyncProbesServer) Recv() (*SyncProbesRequest, error) {
|
||||
m := new(SyncProbesRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
|
@ -400,6 +464,12 @@ var Scheduler_ServiceDesc = grpc.ServiceDesc{
|
|||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "SyncProbes",
|
||||
Handler: _Scheduler_SyncProbes_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "pkg/apis/scheduler/v1/scheduler.proto",
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@ import "pkg/apis/common/v2/common.proto";
|
|||
import "pkg/apis/errordetails/v2/errordetails.proto";
|
||||
import "validate/validate.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "d7y.io/api/pkg/apis/scheduler/v2;scheduler";
|
||||
|
||||
|
@ -319,6 +321,38 @@ message LeaveHostRequest{
|
|||
string id = 1 [(validate.rules).string.min_len = 1];
|
||||
}
|
||||
|
||||
// Probe information.
|
||||
message Probe {
|
||||
// Host metadata.
|
||||
common.Host host = 1 [(validate.rules).message.required = true];
|
||||
// RTTs is all of the round-trip times sent via this pinger.
|
||||
repeated google.protobuf.Duration rtts = 2 [(validate.rules).repeated = {min_items: 1}];
|
||||
// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration min_rtt = 3 [(validate.rules).duration.required = true];
|
||||
// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration max_rtt = 4 [(validate.rules).duration.required = true];
|
||||
// AvgRTT is the average round-trip time sent via this pinger.
|
||||
google.protobuf.Duration avg_rtt = 5 [(validate.rules).duration.required = true];
|
||||
// Task update time.
|
||||
google.protobuf.Timestamp updated_at = 6 [(validate.rules).timestamp.required = true];
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncProbesRequest {
|
||||
// Host metadata.
|
||||
common.Host host = 1 [(validate.rules).message.required = true];
|
||||
// Probes information.
|
||||
repeated Probe probes = 2 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
}
|
||||
|
||||
// SyncProbesResponse represents response of SyncProbes.
|
||||
message SyncProbesResponse {
|
||||
// Hosts needs to be probed.
|
||||
repeated common.Host hosts = 1 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
// Probe interval.
|
||||
google.protobuf.Duration probe_interval = 2 [(validate.rules).duration.required = true];
|
||||
}
|
||||
|
||||
// Scheduler RPC Service.
|
||||
service Scheduler{
|
||||
// AnnouncePeer announces peer to scheduler.
|
||||
|
@ -342,4 +376,7 @@ service Scheduler{
|
|||
|
||||
// LeaveHost releases host in scheduler.
|
||||
rpc LeaveHost(LeaveHostRequest)returns(google.protobuf.Empty);
|
||||
|
||||
// SyncProbes sync probes of the host.
|
||||
rpc SyncProbes(stream SyncProbesRequest)returns(stream SyncProbesResponse);
|
||||
}
|
||||
|
|
|
@ -148,24 +148,22 @@ message Task {
|
|||
message Host {
|
||||
// Host id.
|
||||
string id = 1;
|
||||
// Host ipv4.
|
||||
string ipv4 = 2;
|
||||
// Host ipv6.
|
||||
string ipv6 = 3;
|
||||
// Host ip.
|
||||
string ip = 2;
|
||||
// Peer hostname.
|
||||
string hostname = 4;
|
||||
string hostname = 3;
|
||||
// Port of grpc service.
|
||||
int32 port = 5;
|
||||
int32 port = 4;
|
||||
// Port of download server.
|
||||
int32 download_port = 6;
|
||||
int32 download_port = 5;
|
||||
// Security domain for network.
|
||||
string security_domain = 7;
|
||||
string security_domain = 6;
|
||||
// Host location(area, country, province, city, etc.).
|
||||
repeated string location = 8;
|
||||
repeated string location = 7;
|
||||
// IDC where the peer host is located.
|
||||
string idc = 9;
|
||||
string idc = 8;
|
||||
// Network topology(switch, router, etc.).
|
||||
repeated string net_topology = 10;
|
||||
repeated string net_topology = 9;
|
||||
}
|
||||
|
||||
// Range represents download range.
|
||||
|
|
|
@ -21,6 +21,8 @@ package scheduler;
|
|||
import "common.proto";
|
||||
import "errordetails.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
// RegisterPeerRequest represents peer registered request of AnnouncePeerRequest.
|
||||
message RegisterPeerRequest {
|
||||
|
@ -312,6 +314,38 @@ message LeaveHostRequest{
|
|||
string id = 1;
|
||||
}
|
||||
|
||||
// Probe information.
|
||||
message Probe {
|
||||
// Host metadata.
|
||||
common.Host host = 1;
|
||||
// RTTs is all of the round-trip times sent via this pinger.
|
||||
repeated google.protobuf.Duration rtts = 2;
|
||||
// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration min_rtt = 3;
|
||||
// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration max_rtt = 4;
|
||||
// AvgRTT is the average round-trip time sent via this pinger.
|
||||
google.protobuf.Duration avg_rtt = 5;
|
||||
// Task update time.
|
||||
google.protobuf.Timestamp updated_at = 6;
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncProbesRequest {
|
||||
// Host metadata.
|
||||
common.Host host = 1;
|
||||
// Probes information.
|
||||
repeated Probe probes = 2;
|
||||
}
|
||||
|
||||
// SyncProbesResponse represents response of SyncProbes.
|
||||
message SyncProbesResponse {
|
||||
// Hosts needs to be probed.
|
||||
repeated common.Host hosts = 1;
|
||||
// Probe interval.
|
||||
google.protobuf.Duration probe_interval = 2;
|
||||
}
|
||||
|
||||
// Scheduler RPC Service.
|
||||
service Scheduler{
|
||||
// AnnouncePeer announces peer to scheduler.
|
||||
|
@ -335,4 +369,7 @@ service Scheduler{
|
|||
|
||||
// LeaveHost releases host in scheduler.
|
||||
rpc LeaveHost(LeaveHostRequest)returns(google.protobuf.Empty);
|
||||
|
||||
// SyncProbes sync probes of the host.
|
||||
rpc SyncProbes(stream SyncProbesRequest)returns(stream SyncProbesResponse);
|
||||
}
|
||||
|
|
|
@ -69,32 +69,29 @@ pub struct Host {
|
|||
/// Host id.
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
/// Host ipv4.
|
||||
/// Host ip.
|
||||
#[prost(string, tag = "2")]
|
||||
pub ipv4: ::prost::alloc::string::String,
|
||||
/// Host ipv6.
|
||||
#[prost(string, tag = "3")]
|
||||
pub ipv6: ::prost::alloc::string::String,
|
||||
pub ip: ::prost::alloc::string::String,
|
||||
/// Peer hostname.
|
||||
#[prost(string, tag = "4")]
|
||||
#[prost(string, tag = "3")]
|
||||
pub hostname: ::prost::alloc::string::String,
|
||||
/// Port of grpc service.
|
||||
#[prost(int32, tag = "5")]
|
||||
#[prost(int32, tag = "4")]
|
||||
pub port: i32,
|
||||
/// Port of download server.
|
||||
#[prost(int32, tag = "6")]
|
||||
#[prost(int32, tag = "5")]
|
||||
pub download_port: i32,
|
||||
/// Security domain for network.
|
||||
#[prost(string, tag = "7")]
|
||||
#[prost(string, tag = "6")]
|
||||
pub security_domain: ::prost::alloc::string::String,
|
||||
/// Host location(area, country, province, city, etc.).
|
||||
#[prost(string, repeated, tag = "8")]
|
||||
#[prost(string, repeated, tag = "7")]
|
||||
pub location: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
/// IDC where the peer host is located.
|
||||
#[prost(string, tag = "9")]
|
||||
#[prost(string, tag = "8")]
|
||||
pub idc: ::prost::alloc::string::String,
|
||||
/// Network topology(switch, router, etc.).
|
||||
#[prost(string, repeated, tag = "10")]
|
||||
#[prost(string, repeated, tag = "9")]
|
||||
pub net_topology: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
}
|
||||
/// Range represents download range.
|
||||
|
|
120
src/scheduler.rs
120
src/scheduler.rs
|
@ -436,6 +436,51 @@ pub struct LeaveHostRequest {
|
|||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
}
|
||||
/// Probe information.
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Probe {
|
||||
/// Host metadata.
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub host: ::core::option::Option<super::common::Host>,
|
||||
/// RTTs is all of the round-trip times sent via this pinger.
|
||||
#[prost(message, repeated, tag = "2")]
|
||||
pub rtts: ::prost::alloc::vec::Vec<::prost_types::Duration>,
|
||||
/// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
#[prost(message, optional, tag = "3")]
|
||||
pub min_rtt: ::core::option::Option<::prost_types::Duration>,
|
||||
/// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
#[prost(message, optional, tag = "4")]
|
||||
pub max_rtt: ::core::option::Option<::prost_types::Duration>,
|
||||
/// AvgRTT is the average round-trip time sent via this pinger.
|
||||
#[prost(message, optional, tag = "5")]
|
||||
pub avg_rtt: ::core::option::Option<::prost_types::Duration>,
|
||||
/// Task update time.
|
||||
#[prost(message, optional, tag = "6")]
|
||||
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
|
||||
}
|
||||
/// SyncProbesRequest represents request of SyncProbes.
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SyncProbesRequest {
|
||||
/// Host metadata.
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub host: ::core::option::Option<super::common::Host>,
|
||||
/// Probes information.
|
||||
#[prost(message, repeated, tag = "2")]
|
||||
pub probes: ::prost::alloc::vec::Vec<Probe>,
|
||||
}
|
||||
/// SyncProbesResponse represents response of SyncProbes.
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SyncProbesResponse {
|
||||
/// Hosts needs to be probed.
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub hosts: ::prost::alloc::vec::Vec<super::common::Host>,
|
||||
/// Probe interval.
|
||||
#[prost(message, optional, tag = "2")]
|
||||
pub probe_interval: ::core::option::Option<::prost_types::Duration>,
|
||||
}
|
||||
/// Generated client implementations.
|
||||
pub mod scheduler_client {
|
||||
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||
|
@ -652,6 +697,29 @@ pub mod scheduler_client {
|
|||
);
|
||||
self.inner.unary(request.into_request(), path, codec).await
|
||||
}
|
||||
/// SyncProbes sync probes of the host.
|
||||
pub async fn sync_probes(
|
||||
&mut self,
|
||||
request: impl tonic::IntoStreamingRequest<Message = super::SyncProbesRequest>,
|
||||
) -> Result<
|
||||
tonic::Response<tonic::codec::Streaming<super::SyncProbesResponse>>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::new(
|
||||
tonic::Code::Unknown,
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic::codec::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/scheduler.Scheduler/SyncProbes",
|
||||
);
|
||||
self.inner.streaming(request.into_streaming_request(), path, codec).await
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Generated server implementations.
|
||||
|
@ -703,6 +771,17 @@ pub mod scheduler_server {
|
|||
&self,
|
||||
request: tonic::Request<super::LeaveHostRequest>,
|
||||
) -> Result<tonic::Response<()>, tonic::Status>;
|
||||
/// Server streaming response type for the SyncProbes method.
|
||||
type SyncProbesStream: futures_core::Stream<
|
||||
Item = Result<super::SyncProbesResponse, tonic::Status>,
|
||||
>
|
||||
+ Send
|
||||
+ 'static;
|
||||
/// SyncProbes sync probes of the host.
|
||||
async fn sync_probes(
|
||||
&self,
|
||||
request: tonic::Request<tonic::Streaming<super::SyncProbesRequest>>,
|
||||
) -> Result<tonic::Response<Self::SyncProbesStream>, tonic::Status>;
|
||||
}
|
||||
/// Scheduler RPC Service.
|
||||
#[derive(Debug)]
|
||||
|
@ -1039,6 +1118,47 @@ pub mod scheduler_server {
|
|||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
"/scheduler.Scheduler/SyncProbes" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct SyncProbesSvc<T: Scheduler>(pub Arc<T>);
|
||||
impl<
|
||||
T: Scheduler,
|
||||
> tonic::server::StreamingService<super::SyncProbesRequest>
|
||||
for SyncProbesSvc<T> {
|
||||
type Response = super::SyncProbesResponse;
|
||||
type ResponseStream = T::SyncProbesStream;
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::ResponseStream>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<
|
||||
tonic::Streaming<super::SyncProbesRequest>,
|
||||
>,
|
||||
) -> Self::Future {
|
||||
let inner = self.0.clone();
|
||||
let fut = async move { (*inner).sync_probes(request).await };
|
||||
Box::pin(fut)
|
||||
}
|
||||
}
|
||||
let accept_compression_encodings = self.accept_compression_encodings;
|
||||
let send_compression_encodings = self.send_compression_encodings;
|
||||
let inner = self.inner.clone();
|
||||
let fut = async move {
|
||||
let inner = inner.0;
|
||||
let method = SyncProbesSvc(inner);
|
||||
let codec = tonic::codec::ProstCodec::default();
|
||||
let mut grpc = tonic::server::Grpc::new(codec)
|
||||
.apply_compression_config(
|
||||
accept_compression_encodings,
|
||||
send_compression_encodings,
|
||||
);
|
||||
let res = grpc.streaming(method, req).await;
|
||||
Ok(res)
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
_ => {
|
||||
Box::pin(async move {
|
||||
Ok(
|
||||
|
|
Loading…
Reference in New Issue