Documentation ¶
Index ¶
- Variables
- type ExtendAttribute
- func (*ExtendAttribute) Descriptor() ([]byte, []int)deprecated
- func (x *ExtendAttribute) GetHeader() map[string]string
- func (x *ExtendAttribute) GetStatus() string
- func (x *ExtendAttribute) GetStatusCode() int32
- func (*ExtendAttribute) ProtoMessage()
- func (x *ExtendAttribute) ProtoReflect() protoreflect.Message
- func (x *ExtendAttribute) Reset()
- func (x *ExtendAttribute) String() string
- func (m *ExtendAttribute) Validate() error
- func (m *ExtendAttribute) ValidateAll() error
- type ExtendAttributeMultiError
- type ExtendAttributeValidationError
- func (e ExtendAttributeValidationError) Cause() error
- func (e ExtendAttributeValidationError) Error() string
- func (e ExtendAttributeValidationError) ErrorName() string
- func (e ExtendAttributeValidationError) Field() string
- func (e ExtendAttributeValidationError) Key() bool
- func (e ExtendAttributeValidationError) Reason() string
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetApplication() string
- func (x *Metadata) GetDigest() string
- func (x *Metadata) GetFilters() []string
- func (x *Metadata) GetHeader() map[string]string
- func (x *Metadata) GetPieceSize() int32
- func (x *Metadata) GetRange() *Range
- func (x *Metadata) GetTag() string
- func (x *Metadata) GetUrl() string
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- func (m *Metadata) Validate() error
- func (m *Metadata) ValidateAll() error
- type MetadataMultiError
- type MetadataValidationError
- type Pattern
- type Piece
- func (*Piece) Descriptor() ([]byte, []int)deprecated
- func (x *Piece) GetCost() *durationpb.Duration
- func (x *Piece) GetCreatedAt() *timestamppb.Timestamp
- func (x *Piece) GetDigest() string
- func (x *Piece) GetNumber() uint32
- func (x *Piece) GetOffset() uint64
- func (x *Piece) GetParentId() string
- func (x *Piece) GetSize() uint64
- func (*Piece) ProtoMessage()
- func (x *Piece) ProtoReflect() protoreflect.Message
- func (x *Piece) Reset()
- func (x *Piece) String() string
- func (m *Piece) Validate() error
- func (m *Piece) ValidateAll() error
- type PieceMultiError
- type PieceValidationError
- type Range
- func (*Range) Descriptor() ([]byte, []int)deprecated
- func (x *Range) GetBegin() uint64
- func (x *Range) GetEnd() uint64
- func (*Range) ProtoMessage()
- func (x *Range) ProtoReflect() protoreflect.Message
- func (x *Range) Reset()
- func (x *Range) String() string
- func (m *Range) Validate() error
- func (m *Range) ValidateAll() error
- type RangeMultiError
- type RangeValidationError
- type SizeScope
- type TaskType
Constants ¶
This section is empty.
Variables ¶
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 ( Pattern_name = map[int32]string{ 0: "P2P", 1: "SEED_PEER", 2: "SOURCE", } Pattern_value = map[string]int32{ "P2P": 0, "SEED_PEER": 1, "SOURCE": 2, } )
Enum value maps for Pattern.
var ( TaskType_name = map[int32]string{ 0: "DFDAEMON", 1: "DFCACHE", 2: "DFSTORE", } TaskType_value = map[string]int32{ "DFDAEMON": 0, "DFCACHE": 1, "DFSTORE": 2, } )
Enum value maps for TaskType.
var File_pkg_apis_common_v2_common_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ExtendAttribute ¶
type ExtendAttribute struct { // Task response header, eg: HTTP Response Header Header map[string]string `` /* 153-byte string literal not displayed */ // 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 Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
ExtendAttribute represents extend of attribution.
func (*ExtendAttribute) Descriptor
deprecated
func (*ExtendAttribute) Descriptor() ([]byte, []int)
Deprecated: Use ExtendAttribute.ProtoReflect.Descriptor instead.
func (*ExtendAttribute) GetHeader ¶
func (x *ExtendAttribute) GetHeader() map[string]string
func (*ExtendAttribute) GetStatus ¶
func (x *ExtendAttribute) GetStatus() string
func (*ExtendAttribute) GetStatusCode ¶
func (x *ExtendAttribute) GetStatusCode() int32
func (*ExtendAttribute) ProtoMessage ¶
func (*ExtendAttribute) ProtoMessage()
func (*ExtendAttribute) ProtoReflect ¶
func (x *ExtendAttribute) ProtoReflect() protoreflect.Message
func (*ExtendAttribute) Reset ¶
func (x *ExtendAttribute) Reset()
func (*ExtendAttribute) String ¶
func (x *ExtendAttribute) String() string
func (*ExtendAttribute) Validate ¶
func (m *ExtendAttribute) Validate() error
Validate checks the field values on ExtendAttribute 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 (*ExtendAttribute) ValidateAll ¶
func (m *ExtendAttribute) ValidateAll() error
ValidateAll checks the field values on ExtendAttribute 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 ExtendAttributeMultiError, or nil if none found.
type ExtendAttributeMultiError ¶
type ExtendAttributeMultiError []error
ExtendAttributeMultiError is an error wrapping multiple validation errors returned by ExtendAttribute.ValidateAll() if the designated constraints aren't met.
func (ExtendAttributeMultiError) AllErrors ¶
func (m ExtendAttributeMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ExtendAttributeMultiError) Error ¶
func (m ExtendAttributeMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ExtendAttributeValidationError ¶
type ExtendAttributeValidationError struct {
// contains filtered or unexported fields
}
ExtendAttributeValidationError is the validation error returned by ExtendAttribute.Validate if the designated constraints aren't met.
func (ExtendAttributeValidationError) Cause ¶
func (e ExtendAttributeValidationError) Cause() error
Cause function returns cause value.
func (ExtendAttributeValidationError) Error ¶
func (e ExtendAttributeValidationError) Error() string
Error satisfies the builtin error interface
func (ExtendAttributeValidationError) ErrorName ¶
func (e ExtendAttributeValidationError) ErrorName() string
ErrorName returns error name.
func (ExtendAttributeValidationError) Field ¶
func (e ExtendAttributeValidationError) Field() string
Field function returns field value.
func (ExtendAttributeValidationError) Key ¶
func (e ExtendAttributeValidationError) Key() bool
Key function returns key value.
func (ExtendAttributeValidationError) Reason ¶
func (e ExtendAttributeValidationError) Reason() string
Reason function returns reason value.
type Metadata ¶
type Metadata struct { // Download url. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // Digest checks integrity of url content, for example md5:xxx or sha256:yyy. Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"` // Range is url range of request. Range *Range `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"` // URL tag identifies different task for same url. Tag string `protobuf:"bytes,4,opt,name=tag,proto3" json:"tag,omitempty"` // Application of task. Application string `protobuf:"bytes,5,opt,name=application,proto3" json:"application,omitempty"` // Filter url used to generate task id. Filters []string `protobuf:"bytes,6,rep,name=filters,proto3" json:"filters,omitempty"` // Task request headers. Header map[string]string `` /* 153-byte string literal not displayed */ // Task piece size. PieceSize int32 `protobuf:"varint,8,opt,name=piece_size,json=pieceSize,proto3" json:"piece_size,omitempty"` // contains filtered or unexported fields }
Metadata represents metadata of task.
func (*Metadata) Descriptor
deprecated
func (*Metadata) GetApplication ¶
func (*Metadata) GetFilters ¶
func (*Metadata) GetPieceSize ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
func (*Metadata) Validate ¶
Validate checks the field values on Metadata 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 (*Metadata) ValidateAll ¶
ValidateAll checks the field values on Metadata 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 MetadataMultiError, or nil if none found.
type MetadataMultiError ¶
type MetadataMultiError []error
MetadataMultiError is an error wrapping multiple validation errors returned by Metadata.ValidateAll() if the designated constraints aren't met.
func (MetadataMultiError) AllErrors ¶
func (m MetadataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MetadataMultiError) Error ¶
func (m MetadataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MetadataValidationError ¶
type MetadataValidationError struct {
// contains filtered or unexported fields
}
MetadataValidationError is the validation error returned by Metadata.Validate if the designated constraints aren't met.
func (MetadataValidationError) Cause ¶
func (e MetadataValidationError) Cause() error
Cause function returns cause value.
func (MetadataValidationError) Error ¶
func (e MetadataValidationError) Error() string
Error satisfies the builtin error interface
func (MetadataValidationError) ErrorName ¶
func (e MetadataValidationError) ErrorName() string
ErrorName returns error name.
func (MetadataValidationError) Field ¶
func (e MetadataValidationError) Field() string
Field function returns field value.
func (MetadataValidationError) Key ¶
func (e MetadataValidationError) Key() bool
Key function returns key value.
func (MetadataValidationError) Reason ¶
func (e MetadataValidationError) Reason() string
Reason function returns reason value.
type Pattern ¶
type Pattern int32
Pattern represents pattern of task.
const ( // Default pattern, scheduler will use all p2p node // include dfdaemon and seed peers. Pattern_P2P Pattern = 0 // Seed peer pattern, scheduler will use only seed peers. Pattern_SEED_PEER Pattern = 1 // Source pattern, scheduler will say back source // when there is no available peer in p2p. Pattern_SOURCE Pattern = 2 )
func (Pattern) Descriptor ¶
func (Pattern) Descriptor() protoreflect.EnumDescriptor
func (Pattern) EnumDescriptor
deprecated
func (Pattern) Number ¶
func (x Pattern) Number() protoreflect.EnumNumber
func (Pattern) Type ¶
func (Pattern) Type() protoreflect.EnumType
type Piece ¶
type Piece struct { // Piece number. Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // Parent peer id. ParentId string `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` // Piece offset. Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` // Piece size. Size uint64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` // Digest of piece data, for example md5:xxx or sha256:yyy. Digest string `protobuf:"bytes,5,opt,name=digest,proto3" json:"digest,omitempty"` // Downloading piece costs time. Cost *durationpb.Duration `protobuf:"bytes,6,opt,name=cost,proto3" json:"cost,omitempty"` // Piece create time. CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*Piece) Descriptor
deprecated
func (*Piece) GetCost ¶
func (x *Piece) GetCost() *durationpb.Duration
func (*Piece) GetCreatedAt ¶
func (x *Piece) GetCreatedAt() *timestamppb.Timestamp
func (*Piece) GetParentId ¶
func (*Piece) ProtoMessage ¶
func (*Piece) ProtoMessage()
func (*Piece) ProtoReflect ¶
func (x *Piece) ProtoReflect() protoreflect.Message
func (*Piece) Validate ¶
Validate checks the field values on Piece with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Piece) ValidateAll ¶
ValidateAll checks the field values on Piece 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 PieceMultiError, or nil if none found.
type PieceMultiError ¶
type PieceMultiError []error
PieceMultiError is an error wrapping multiple validation errors returned by Piece.ValidateAll() if the designated constraints aren't met.
func (PieceMultiError) AllErrors ¶
func (m PieceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PieceMultiError) Error ¶
func (m PieceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PieceValidationError ¶
type PieceValidationError struct {
// contains filtered or unexported fields
}
PieceValidationError is the validation error returned by Piece.Validate if the designated constraints aren't met.
func (PieceValidationError) Cause ¶
func (e PieceValidationError) Cause() error
Cause function returns cause value.
func (PieceValidationError) Error ¶
func (e PieceValidationError) Error() string
Error satisfies the builtin error interface
func (PieceValidationError) ErrorName ¶
func (e PieceValidationError) ErrorName() string
ErrorName returns error name.
func (PieceValidationError) Field ¶
func (e PieceValidationError) Field() string
Field function returns field value.
func (PieceValidationError) Key ¶
func (e PieceValidationError) Key() bool
Key function returns key value.
func (PieceValidationError) Reason ¶
func (e PieceValidationError) Reason() string
Reason function returns reason value.
type Range ¶
type Range struct { Begin uint64 `protobuf:"varint,1,opt,name=begin,proto3" json:"begin,omitempty"` End uint64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
func (*Range) Descriptor
deprecated
func (*Range) ProtoMessage ¶
func (*Range) ProtoMessage()
func (*Range) ProtoReflect ¶
func (x *Range) ProtoReflect() protoreflect.Message
func (*Range) Validate ¶
Validate checks the field values on Range with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Range) ValidateAll ¶
ValidateAll checks the field values on Range with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RangeMultiError, or nil if none found.
type RangeMultiError ¶
type RangeMultiError []error
RangeMultiError is an error wrapping multiple validation errors returned by Range.ValidateAll() if the designated constraints aren't met.
func (RangeMultiError) AllErrors ¶
func (m RangeMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RangeMultiError) Error ¶
func (m RangeMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RangeValidationError ¶
type RangeValidationError struct {
// contains filtered or unexported fields
}
RangeValidationError is the validation error returned by Range.Validate if the designated constraints aren't met.
func (RangeValidationError) Cause ¶
func (e RangeValidationError) Cause() error
Cause function returns cause value.
func (RangeValidationError) Error ¶
func (e RangeValidationError) Error() string
Error satisfies the builtin error interface
func (RangeValidationError) ErrorName ¶
func (e RangeValidationError) ErrorName() string
ErrorName returns error name.
func (RangeValidationError) Field ¶
func (e RangeValidationError) Field() string
Field function returns field value.
func (RangeValidationError) Key ¶
func (e RangeValidationError) Key() bool
Key function returns key value.
func (RangeValidationError) Reason ¶
func (e RangeValidationError) Reason() string
Reason function returns reason value.
type SizeScope ¶
type SizeScope int32
SizeScope represents size scope of task.
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 TaskType ¶
type TaskType int32
TaskType represents type of task.
const ( // DFDAEMON is dfdeamon type of task, // dfdeamon task is a normal p2p task. TaskType_DFDAEMON TaskType = 0 // DFCACHE is dfcache type of task, // dfcache task is a cache task, and the task url is fake url. // It can only be used for caching and cannot be downloaded back to source. TaskType_DFCACHE TaskType = 1 // DFSTORE is dfstore type of task, // dfstore task is a persistent task in backend. TaskType_DFSTORE TaskType = 2 )
func (TaskType) Descriptor ¶
func (TaskType) Descriptor() protoreflect.EnumDescriptor
func (TaskType) EnumDescriptor
deprecated
func (TaskType) Number ¶
func (x TaskType) Number() protoreflect.EnumNumber
func (TaskType) Type ¶
func (TaskType) Type() protoreflect.EnumType