Documentation ¶
Index ¶
- Variables
- type Code
- type GrpcDfError
- func (*GrpcDfError) Descriptor() ([]byte, []int)deprecated
- func (x *GrpcDfError) GetCode() Code
- func (x *GrpcDfError) GetMessage() string
- func (*GrpcDfError) ProtoMessage()
- func (x *GrpcDfError) ProtoReflect() protoreflect.Message
- func (x *GrpcDfError) Reset()
- func (x *GrpcDfError) String() string
- func (m *GrpcDfError) Validate() error
- func (m *GrpcDfError) ValidateAll() error
- type GrpcDfErrorMultiError
- type GrpcDfErrorValidationError
- func (e GrpcDfErrorValidationError) Cause() error
- func (e GrpcDfErrorValidationError) Error() string
- func (e GrpcDfErrorValidationError) ErrorName() string
- func (e GrpcDfErrorValidationError) Field() string
- func (e GrpcDfErrorValidationError) Key() bool
- func (e GrpcDfErrorValidationError) Reason() string
- type HostLoad
- func (*HostLoad) Descriptor() ([]byte, []int)deprecated
- func (x *HostLoad) GetCpuRatio() float32
- func (x *HostLoad) GetDiskRatio() float32
- func (x *HostLoad) GetMemRatio() float32
- func (*HostLoad) ProtoMessage()
- func (x *HostLoad) ProtoReflect() protoreflect.Message
- func (x *HostLoad) Reset()
- func (x *HostLoad) String() string
- func (m *HostLoad) Validate() error
- func (m *HostLoad) ValidateAll() error
- type HostLoadMultiError
- type HostLoadValidationError
- type PieceInfo
- func (*PieceInfo) Descriptor() ([]byte, []int)deprecated
- func (x *PieceInfo) GetPieceMd5() string
- func (x *PieceInfo) GetPieceNum() int32
- func (x *PieceInfo) GetPieceOffset() uint64
- func (x *PieceInfo) GetPieceStyle() PieceStyle
- func (x *PieceInfo) GetRangeSize() int32
- func (x *PieceInfo) GetRangeStart() uint64
- func (*PieceInfo) ProtoMessage()
- func (x *PieceInfo) ProtoReflect() protoreflect.Message
- func (x *PieceInfo) Reset()
- func (x *PieceInfo) String() string
- func (m *PieceInfo) Validate() error
- func (m *PieceInfo) ValidateAll() error
- type PieceInfoMultiError
- type PieceInfoValidationError
- type PiecePacket
- func (*PiecePacket) Descriptor() ([]byte, []int)deprecated
- func (x *PiecePacket) GetContentLength() int64
- func (x *PiecePacket) GetDstAddr() string
- func (x *PiecePacket) GetDstPid() string
- func (x *PiecePacket) GetPieceInfos() []*PieceInfo
- func (x *PiecePacket) GetPieceMd5Sign() string
- func (x *PiecePacket) GetTaskId() string
- func (x *PiecePacket) GetTotalPiece() int32
- func (*PiecePacket) ProtoMessage()
- func (x *PiecePacket) ProtoReflect() protoreflect.Message
- func (x *PiecePacket) Reset()
- func (x *PiecePacket) String() string
- func (m *PiecePacket) Validate() error
- func (m *PiecePacket) ValidateAll() error
- type PiecePacketMultiError
- type PiecePacketValidationError
- func (e PiecePacketValidationError) Cause() error
- func (e PiecePacketValidationError) Error() string
- func (e PiecePacketValidationError) ErrorName() string
- func (e PiecePacketValidationError) Field() string
- func (e PiecePacketValidationError) Key() bool
- func (e PiecePacketValidationError) Reason() string
- type PieceStyle
- type PieceTaskRequest
- func (*PieceTaskRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PieceTaskRequest) GetDstPid() string
- func (x *PieceTaskRequest) GetLimit() int32
- func (x *PieceTaskRequest) GetSrcPid() string
- func (x *PieceTaskRequest) GetStartNum() int32
- func (x *PieceTaskRequest) GetTaskId() string
- func (*PieceTaskRequest) ProtoMessage()
- func (x *PieceTaskRequest) ProtoReflect() protoreflect.Message
- func (x *PieceTaskRequest) Reset()
- func (x *PieceTaskRequest) String() string
- func (m *PieceTaskRequest) Validate() error
- func (m *PieceTaskRequest) ValidateAll() error
- type PieceTaskRequestMultiError
- type PieceTaskRequestValidationError
- func (e PieceTaskRequestValidationError) Cause() error
- func (e PieceTaskRequestValidationError) Error() string
- func (e PieceTaskRequestValidationError) ErrorName() string
- func (e PieceTaskRequestValidationError) Field() string
- func (e PieceTaskRequestValidationError) Key() bool
- func (e PieceTaskRequestValidationError) Reason() string
- type SizeScope
- type UrlMeta
- func (*UrlMeta) Descriptor() ([]byte, []int)deprecated
- func (x *UrlMeta) GetDigest() string
- func (x *UrlMeta) GetFilter() string
- func (x *UrlMeta) GetHeader() map[string]string
- func (x *UrlMeta) GetRange() string
- func (x *UrlMeta) GetTag() string
- func (*UrlMeta) ProtoMessage()
- func (x *UrlMeta) ProtoReflect() protoreflect.Message
- func (x *UrlMeta) Reset()
- func (x *UrlMeta) String() string
- func (m *UrlMeta) Validate() error
- func (m *UrlMeta) ValidateAll() error
- type UrlMetaMultiError
- type UrlMetaValidationError
Constants ¶
This section is empty.
Variables ¶
var ( Code_name = map[int32]string{ 0: "X_UNSPECIFIED", 200: "Success", 500: "ServerUnavailable", 1000: "ResourceLacked", 1400: "BadRequest", 1404: "PeerTaskNotFound", 1500: "UnknownError", 1504: "RequestTimeOut", 4000: "ClientError", 4001: "ClientPieceRequestFail", 4002: "ClientScheduleTimeout", 4003: "ClientContextCanceled", 4004: "ClientWaitPieceReady", 4005: "ClientPieceDownloadFail", 4006: "ClientRequestLimitFail", 5000: "SchedError", 5001: "SchedNeedBackSource", 5002: "SchedPeerGone", 5004: "SchedPeerNotFound", 5005: "SchedPeerPieceResultReportFail", 5006: "SchedTaskStatusError", 6000: "CDNError", 6001: "CDNTaskRegistryFail", 6002: "CDNTaskDownloadFail", 6404: "CDNTaskNotFound", 7001: "InvalidResourceType", } Code_value = map[string]int32{ "X_UNSPECIFIED": 0, "Success": 200, "ServerUnavailable": 500, "ResourceLacked": 1000, "BadRequest": 1400, "PeerTaskNotFound": 1404, "UnknownError": 1500, "RequestTimeOut": 1504, "ClientError": 4000, "ClientPieceRequestFail": 4001, "ClientScheduleTimeout": 4002, "ClientContextCanceled": 4003, "ClientWaitPieceReady": 4004, "ClientPieceDownloadFail": 4005, "ClientRequestLimitFail": 4006, "SchedError": 5000, "SchedNeedBackSource": 5001, "SchedPeerGone": 5002, "SchedPeerNotFound": 5004, "SchedPeerPieceResultReportFail": 5005, "SchedTaskStatusError": 5006, "CDNError": 6000, "CDNTaskRegistryFail": 6001, "CDNTaskDownloadFail": 6002, "CDNTaskNotFound": 6404, "InvalidResourceType": 7001, } )
Enum value maps for Code.
var ( PieceStyle_name = map[int32]string{ 0: "PLAIN", } PieceStyle_value = map[string]int32{ "PLAIN": 0, } )
Enum value maps for PieceStyle.
var ( SizeScope_name = map[int32]string{ 0: "NORMAL", 1: "SMALL", 2: "TINY", } SizeScope_value = map[string]int32{ "NORMAL": 0, "SMALL": 1, "TINY": 2, } )
Enum value maps for SizeScope.
var File_pkg_rpc_base_base_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code int32
const ( Code_X_UNSPECIFIED Code = 0 // success code 200-299 Code_Success Code = 200 Code_ServerUnavailable Code = 500 // common response error 1000-1999 // client can be migrated to another scheduler/CDN Code_ResourceLacked Code = 1000 Code_BadRequest Code = 1400 Code_PeerTaskNotFound Code = 1404 Code_UnknownError Code = 1500 Code_RequestTimeOut Code = 1504 // 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 Code_ClientContextCanceled Code = 4003 Code_ClientWaitPieceReady Code = 4004 // when target peer downloads from source slowly, should wait Code_ClientPieceDownloadFail Code = 4005 Code_ClientRequestLimitFail Code = 4006 // 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 // cdnsystem response error 6000-6999 Code_CDNError Code = 6000 Code_CDNTaskRegistryFail Code = 6001 Code_CDNTaskDownloadFail Code = 6002 Code_CDNTaskNotFound Code = 6404 // manager response error 7000-7999 Code_InvalidResourceType Code = 7001 )
func (Code) Descriptor ¶
func (Code) Descriptor() protoreflect.EnumDescriptor
func (Code) EnumDescriptor
deprecated
func (Code) Number ¶
func (x Code) Number() protoreflect.EnumNumber
func (Code) Type ¶
func (Code) Type() protoreflect.EnumType
type GrpcDfError ¶
type GrpcDfError struct { Code Code `protobuf:"varint,1,opt,name=code,proto3,enum=base.Code" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*GrpcDfError) Descriptor
deprecated
func (*GrpcDfError) Descriptor() ([]byte, []int)
Deprecated: Use GrpcDfError.ProtoReflect.Descriptor instead.
func (*GrpcDfError) GetCode ¶
func (x *GrpcDfError) GetCode() Code
func (*GrpcDfError) GetMessage ¶
func (x *GrpcDfError) GetMessage() string
func (*GrpcDfError) ProtoMessage ¶
func (*GrpcDfError) ProtoMessage()
func (*GrpcDfError) ProtoReflect ¶
func (x *GrpcDfError) ProtoReflect() protoreflect.Message
func (*GrpcDfError) Reset ¶
func (x *GrpcDfError) Reset()
func (*GrpcDfError) String ¶
func (x *GrpcDfError) String() string
func (*GrpcDfError) Validate ¶
func (m *GrpcDfError) Validate() error
Validate checks the field values on GrpcDfError 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 (*GrpcDfError) ValidateAll ¶ added in v2.0.1
func (m *GrpcDfError) ValidateAll() error
ValidateAll checks the field values on GrpcDfError 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 GrpcDfErrorMultiError, or nil if none found.
type GrpcDfErrorMultiError ¶ added in v2.0.1
type GrpcDfErrorMultiError []error
GrpcDfErrorMultiError is an error wrapping multiple validation errors returned by GrpcDfError.ValidateAll() if the designated constraints aren't met.
func (GrpcDfErrorMultiError) AllErrors ¶ added in v2.0.1
func (m GrpcDfErrorMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GrpcDfErrorMultiError) Error ¶ added in v2.0.1
func (m GrpcDfErrorMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GrpcDfErrorValidationError ¶
type GrpcDfErrorValidationError struct {
// contains filtered or unexported fields
}
GrpcDfErrorValidationError is the validation error returned by GrpcDfError.Validate if the designated constraints aren't met.
func (GrpcDfErrorValidationError) Cause ¶
func (e GrpcDfErrorValidationError) Cause() error
Cause function returns cause value.
func (GrpcDfErrorValidationError) Error ¶
func (e GrpcDfErrorValidationError) Error() string
Error satisfies the builtin error interface
func (GrpcDfErrorValidationError) ErrorName ¶
func (e GrpcDfErrorValidationError) ErrorName() string
ErrorName returns error name.
func (GrpcDfErrorValidationError) Field ¶
func (e GrpcDfErrorValidationError) Field() string
Field function returns field value.
func (GrpcDfErrorValidationError) Key ¶
func (e GrpcDfErrorValidationError) Key() bool
Key function returns key value.
func (GrpcDfErrorValidationError) Reason ¶
func (e GrpcDfErrorValidationError) Reason() string
Reason function returns reason value.
type HostLoad ¶
type HostLoad struct { // 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"` // contains filtered or unexported fields }
func (*HostLoad) Descriptor
deprecated
func (*HostLoad) GetCpuRatio ¶
func (*HostLoad) GetDiskRatio ¶
func (*HostLoad) GetMemRatio ¶
func (*HostLoad) ProtoMessage ¶
func (*HostLoad) ProtoMessage()
func (*HostLoad) ProtoReflect ¶
func (x *HostLoad) ProtoReflect() protoreflect.Message
func (*HostLoad) Validate ¶
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 (*HostLoad) ValidateAll ¶ added in v2.0.1
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.
type HostLoadMultiError ¶ added in v2.0.1
type HostLoadMultiError []error
HostLoadMultiError is an error wrapping multiple validation errors returned by HostLoad.ValidateAll() if the designated constraints aren't met.
func (HostLoadMultiError) AllErrors ¶ added in v2.0.1
func (m HostLoadMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HostLoadMultiError) Error ¶ added in v2.0.1
func (m HostLoadMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HostLoadValidationError ¶
type HostLoadValidationError struct {
// contains filtered or unexported fields
}
HostLoadValidationError is the validation error returned by HostLoad.Validate if the designated constraints aren't met.
func (HostLoadValidationError) Cause ¶
func (e HostLoadValidationError) Cause() error
Cause function returns cause value.
func (HostLoadValidationError) Error ¶
func (e HostLoadValidationError) Error() string
Error satisfies the builtin error interface
func (HostLoadValidationError) ErrorName ¶
func (e HostLoadValidationError) ErrorName() string
ErrorName returns error name.
func (HostLoadValidationError) Field ¶
func (e HostLoadValidationError) Field() string
Field function returns field value.
func (HostLoadValidationError) Key ¶
func (e HostLoadValidationError) Key() bool
Key function returns key value.
func (HostLoadValidationError) Reason ¶
func (e HostLoadValidationError) Reason() string
Reason function returns reason value.
type PieceInfo ¶
type PieceInfo struct { 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 int32 `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=base.PieceStyle" json:"piece_style,omitempty"` // contains filtered or unexported fields }
func (*PieceInfo) Descriptor
deprecated
func (*PieceInfo) GetPieceMd5 ¶
func (*PieceInfo) GetPieceNum ¶
func (*PieceInfo) GetPieceOffset ¶
func (*PieceInfo) GetPieceStyle ¶
func (x *PieceInfo) GetPieceStyle() PieceStyle
func (*PieceInfo) GetRangeSize ¶
func (*PieceInfo) GetRangeStart ¶
func (*PieceInfo) ProtoMessage ¶
func (*PieceInfo) ProtoMessage()
func (*PieceInfo) ProtoReflect ¶
func (x *PieceInfo) ProtoReflect() protoreflect.Message
func (*PieceInfo) Validate ¶
Validate checks the field values on PieceInfo 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 (*PieceInfo) ValidateAll ¶ added in v2.0.1
ValidateAll checks the field values on PieceInfo 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 PieceInfoMultiError, or nil if none found.
type PieceInfoMultiError ¶ added in v2.0.1
type PieceInfoMultiError []error
PieceInfoMultiError is an error wrapping multiple validation errors returned by PieceInfo.ValidateAll() if the designated constraints aren't met.
func (PieceInfoMultiError) AllErrors ¶ added in v2.0.1
func (m PieceInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PieceInfoMultiError) Error ¶ added in v2.0.1
func (m PieceInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PieceInfoValidationError ¶
type PieceInfoValidationError struct {
// contains filtered or unexported fields
}
PieceInfoValidationError is the validation error returned by PieceInfo.Validate if the designated constraints aren't met.
func (PieceInfoValidationError) Cause ¶
func (e PieceInfoValidationError) Cause() error
Cause function returns cause value.
func (PieceInfoValidationError) Error ¶
func (e PieceInfoValidationError) Error() string
Error satisfies the builtin error interface
func (PieceInfoValidationError) ErrorName ¶
func (e PieceInfoValidationError) ErrorName() string
ErrorName returns error name.
func (PieceInfoValidationError) Field ¶
func (e PieceInfoValidationError) Field() string
Field function returns field value.
func (PieceInfoValidationError) Key ¶
func (e PieceInfoValidationError) Key() bool
Key function returns key value.
func (PieceInfoValidationError) Reason ¶
func (e PieceInfoValidationError) Reason() string
Reason function returns reason value.
type PiecePacket ¶
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 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 TotalPiece int32 `protobuf:"varint,6,opt,name=total_piece,json=totalPiece,proto3" json:"total_piece,omitempty"` ContentLength int64 `protobuf:"varint,7,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"` // sha256 code of all piece md5 PieceMd5Sign string `protobuf:"bytes,8,opt,name=piece_md5_sign,json=pieceMd5Sign,proto3" json:"piece_md5_sign,omitempty"` // contains filtered or unexported fields }
func (*PiecePacket) Descriptor
deprecated
func (*PiecePacket) Descriptor() ([]byte, []int)
Deprecated: Use PiecePacket.ProtoReflect.Descriptor instead.
func (*PiecePacket) GetContentLength ¶
func (x *PiecePacket) GetContentLength() int64
func (*PiecePacket) GetDstAddr ¶
func (x *PiecePacket) GetDstAddr() string
func (*PiecePacket) GetDstPid ¶
func (x *PiecePacket) GetDstPid() string
func (*PiecePacket) GetPieceInfos ¶
func (x *PiecePacket) GetPieceInfos() []*PieceInfo
func (*PiecePacket) GetPieceMd5Sign ¶
func (x *PiecePacket) GetPieceMd5Sign() string
func (*PiecePacket) GetTaskId ¶
func (x *PiecePacket) GetTaskId() string
func (*PiecePacket) GetTotalPiece ¶
func (x *PiecePacket) GetTotalPiece() int32
func (*PiecePacket) ProtoMessage ¶
func (*PiecePacket) ProtoMessage()
func (*PiecePacket) ProtoReflect ¶
func (x *PiecePacket) ProtoReflect() protoreflect.Message
func (*PiecePacket) Reset ¶
func (x *PiecePacket) Reset()
func (*PiecePacket) String ¶
func (x *PiecePacket) String() string
func (*PiecePacket) Validate ¶
func (m *PiecePacket) Validate() error
Validate checks the field values on PiecePacket 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 (*PiecePacket) ValidateAll ¶ added in v2.0.1
func (m *PiecePacket) ValidateAll() error
ValidateAll checks the field values on PiecePacket 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 PiecePacketMultiError, or nil if none found.
type PiecePacketMultiError ¶ added in v2.0.1
type PiecePacketMultiError []error
PiecePacketMultiError is an error wrapping multiple validation errors returned by PiecePacket.ValidateAll() if the designated constraints aren't met.
func (PiecePacketMultiError) AllErrors ¶ added in v2.0.1
func (m PiecePacketMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PiecePacketMultiError) Error ¶ added in v2.0.1
func (m PiecePacketMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PiecePacketValidationError ¶
type PiecePacketValidationError struct {
// contains filtered or unexported fields
}
PiecePacketValidationError is the validation error returned by PiecePacket.Validate if the designated constraints aren't met.
func (PiecePacketValidationError) Cause ¶
func (e PiecePacketValidationError) Cause() error
Cause function returns cause value.
func (PiecePacketValidationError) Error ¶
func (e PiecePacketValidationError) Error() string
Error satisfies the builtin error interface
func (PiecePacketValidationError) ErrorName ¶
func (e PiecePacketValidationError) ErrorName() string
ErrorName returns error name.
func (PiecePacketValidationError) Field ¶
func (e PiecePacketValidationError) Field() string
Field function returns field value.
func (PiecePacketValidationError) Key ¶
func (e PiecePacketValidationError) Key() bool
Key function returns key value.
func (PiecePacketValidationError) Reason ¶
func (e PiecePacketValidationError) Reason() string
Reason function returns reason value.
type PieceStyle ¶
type PieceStyle int32
const (
PieceStyle_PLAIN PieceStyle = 0
)
func (PieceStyle) Descriptor ¶
func (PieceStyle) Descriptor() protoreflect.EnumDescriptor
func (PieceStyle) Enum ¶
func (x PieceStyle) Enum() *PieceStyle
func (PieceStyle) EnumDescriptor
deprecated
func (PieceStyle) EnumDescriptor() ([]byte, []int)
Deprecated: Use PieceStyle.Descriptor instead.
func (PieceStyle) Number ¶
func (x PieceStyle) Number() protoreflect.EnumNumber
func (PieceStyle) String ¶
func (x PieceStyle) String() string
func (PieceStyle) Type ¶
func (PieceStyle) Type() protoreflect.EnumType
type PieceTaskRequest ¶
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 StartNum int32 `protobuf:"varint,4,opt,name=start_num,json=startNum,proto3" json:"start_num,omitempty"` // expected piece count Limit int32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*PieceTaskRequest) Descriptor
deprecated
func (*PieceTaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use PieceTaskRequest.ProtoReflect.Descriptor instead.
func (*PieceTaskRequest) GetDstPid ¶
func (x *PieceTaskRequest) GetDstPid() string
func (*PieceTaskRequest) GetLimit ¶
func (x *PieceTaskRequest) GetLimit() int32
func (*PieceTaskRequest) GetSrcPid ¶
func (x *PieceTaskRequest) GetSrcPid() string
func (*PieceTaskRequest) GetStartNum ¶
func (x *PieceTaskRequest) GetStartNum() int32
func (*PieceTaskRequest) GetTaskId ¶
func (x *PieceTaskRequest) GetTaskId() string
func (*PieceTaskRequest) ProtoMessage ¶
func (*PieceTaskRequest) ProtoMessage()
func (*PieceTaskRequest) ProtoReflect ¶
func (x *PieceTaskRequest) ProtoReflect() protoreflect.Message
func (*PieceTaskRequest) Reset ¶
func (x *PieceTaskRequest) Reset()
func (*PieceTaskRequest) String ¶
func (x *PieceTaskRequest) String() string
func (*PieceTaskRequest) Validate ¶
func (m *PieceTaskRequest) Validate() error
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.
func (*PieceTaskRequest) ValidateAll ¶ added in v2.0.1
func (m *PieceTaskRequest) ValidateAll() error
ValidateAll checks the field values on PieceTaskRequest 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 PieceTaskRequestMultiError, or nil if none found.
type PieceTaskRequestMultiError ¶ added in v2.0.1
type PieceTaskRequestMultiError []error
PieceTaskRequestMultiError is an error wrapping multiple validation errors returned by PieceTaskRequest.ValidateAll() if the designated constraints aren't met.
func (PieceTaskRequestMultiError) AllErrors ¶ added in v2.0.1
func (m PieceTaskRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PieceTaskRequestMultiError) Error ¶ added in v2.0.1
func (m PieceTaskRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PieceTaskRequestValidationError ¶
type PieceTaskRequestValidationError struct {
// contains filtered or unexported fields
}
PieceTaskRequestValidationError is the validation error returned by PieceTaskRequest.Validate if the designated constraints aren't met.
func (PieceTaskRequestValidationError) Cause ¶
func (e PieceTaskRequestValidationError) Cause() error
Cause function returns cause value.
func (PieceTaskRequestValidationError) Error ¶
func (e PieceTaskRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PieceTaskRequestValidationError) ErrorName ¶
func (e PieceTaskRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PieceTaskRequestValidationError) Field ¶
func (e PieceTaskRequestValidationError) Field() string
Field function returns field value.
func (PieceTaskRequestValidationError) Key ¶
func (e PieceTaskRequestValidationError) Key() bool
Key function returns key value.
func (PieceTaskRequestValidationError) Reason ¶
func (e PieceTaskRequestValidationError) Reason() string
Reason function returns reason value.
type SizeScope ¶
type SizeScope int32
func (SizeScope) Descriptor ¶
func (SizeScope) Descriptor() protoreflect.EnumDescriptor
func (SizeScope) EnumDescriptor
deprecated
func (SizeScope) Number ¶
func (x SizeScope) Number() protoreflect.EnumNumber
func (SizeScope) Type ¶
func (SizeScope) Type() protoreflect.EnumType
type UrlMeta ¶
type UrlMeta struct { // 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 Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` // content range for url Range string `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"` // filter url used to generate task id Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` // other url header infos Header map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
UrlMeta describes url meta info.
func (*UrlMeta) Descriptor
deprecated
func (*UrlMeta) ProtoMessage ¶
func (*UrlMeta) ProtoMessage()
func (*UrlMeta) ProtoReflect ¶
func (x *UrlMeta) ProtoReflect() protoreflect.Message
func (*UrlMeta) Validate ¶
Validate checks the field values on UrlMeta 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 (*UrlMeta) ValidateAll ¶ added in v2.0.1
ValidateAll checks the field values on UrlMeta 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 UrlMetaMultiError, or nil if none found.
type UrlMetaMultiError ¶ added in v2.0.1
type UrlMetaMultiError []error
UrlMetaMultiError is an error wrapping multiple validation errors returned by UrlMeta.ValidateAll() if the designated constraints aren't met.
func (UrlMetaMultiError) AllErrors ¶ added in v2.0.1
func (m UrlMetaMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UrlMetaMultiError) Error ¶ added in v2.0.1
func (m UrlMetaMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UrlMetaValidationError ¶
type UrlMetaValidationError struct {
// contains filtered or unexported fields
}
UrlMetaValidationError is the validation error returned by UrlMeta.Validate if the designated constraints aren't met.
func (UrlMetaValidationError) Cause ¶
func (e UrlMetaValidationError) Cause() error
Cause function returns cause value.
func (UrlMetaValidationError) Error ¶
func (e UrlMetaValidationError) Error() string
Error satisfies the builtin error interface
func (UrlMetaValidationError) ErrorName ¶
func (e UrlMetaValidationError) ErrorName() string
ErrorName returns error name.
func (UrlMetaValidationError) Field ¶
func (e UrlMetaValidationError) Field() string
Field function returns field value.
func (UrlMetaValidationError) Key ¶
func (e UrlMetaValidationError) Key() bool
Key function returns key value.
func (UrlMetaValidationError) Reason ¶
func (e UrlMetaValidationError) Reason() string
Reason function returns reason value.