common

package
v2.2.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 19 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SizeScope_name = map[int32]string{
		0: "NORMAL",
		1: "SMALL",
		2: "TINY",
		3: "EMPTY",
		4: "UNKNOW",
	}
	SizeScope_value = map[string]int32{
		"NORMAL": 0,
		"SMALL":  1,
		"TINY":   2,
		"EMPTY":  3,
		"UNKNOW": 4,
	}
)

Enum value maps for SizeScope.

View Source
var (
	TaskType_name = map[int32]string{
		0: "STANDARD",
		1: "PERSISTENT",
		2: "PERSISTENT_CACHE",
		3: "CACHE",
	}
	TaskType_value = map[string]int32{
		"STANDARD":         0,
		"PERSISTENT":       1,
		"PERSISTENT_CACHE": 2,
		"CACHE":            3,
	}
)

Enum value maps for TaskType.

View Source
var (
	TrafficType_name = map[int32]string{
		0: "BACK_TO_SOURCE",
		1: "REMOTE_PEER",
		2: "LOCAL_PEER",
	}
	TrafficType_value = map[string]int32{
		"BACK_TO_SOURCE": 0,
		"REMOTE_PEER":    1,
		"LOCAL_PEER":     2,
	}
)

Enum value maps for TrafficType.

View Source
var (
	Priority_name = map[int32]string{
		0: "LEVEL0",
		1: "LEVEL1",
		2: "LEVEL2",
		3: "LEVEL3",
		4: "LEVEL4",
		5: "LEVEL5",
		6: "LEVEL6",
	}
	Priority_value = map[string]int32{
		"LEVEL0": 0,
		"LEVEL1": 1,
		"LEVEL2": 2,
		"LEVEL3": 3,
		"LEVEL4": 4,
		"LEVEL5": 5,
		"LEVEL6": 6,
	}
)

Enum value maps for Priority.

View Source
var File_pkg_apis_common_v2_common_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Build

type Build struct {

	// Git version.
	GitVersion string `protobuf:"bytes,1,opt,name=git_version,json=gitVersion,proto3" json:"git_version,omitempty"`
	// Git commit.
	GitCommit *string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit,proto3,oneof" json:"git_commit,omitempty"`
	// Golang version.
	GoVersion *string `protobuf:"bytes,3,opt,name=go_version,json=goVersion,proto3,oneof" json:"go_version,omitempty"`
	// Rust version.
	RustVersion *string `protobuf:"bytes,4,opt,name=rust_version,json=rustVersion,proto3,oneof" json:"rust_version,omitempty"`
	// Build platform.
	Platform *string `protobuf:"bytes,5,opt,name=platform,proto3,oneof" json:"platform,omitempty"`
	// contains filtered or unexported fields
}

Build information.

func (*Build) Descriptor deprecated

func (*Build) Descriptor() ([]byte, []int)

Deprecated: Use Build.ProtoReflect.Descriptor instead.

func (*Build) GetGitCommit

func (x *Build) GetGitCommit() string

func (*Build) GetGitVersion

func (x *Build) GetGitVersion() string

func (*Build) GetGoVersion

func (x *Build) GetGoVersion() string

func (*Build) GetPlatform

func (x *Build) GetPlatform() string

func (*Build) GetRustVersion added in v2.0.8

func (x *Build) GetRustVersion() string

func (*Build) ProtoMessage

func (*Build) ProtoMessage()

func (*Build) ProtoReflect

func (x *Build) ProtoReflect() protoreflect.Message

func (*Build) Reset

func (x *Build) Reset()

func (*Build) String

func (x *Build) String() string

func (*Build) Validate

func (m *Build) Validate() error

Validate checks the field values on Build with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Build) ValidateAll

func (m *Build) ValidateAll() error

ValidateAll checks the field values on Build with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in BuildMultiError, or nil if none found.

type BuildMultiError

type BuildMultiError []error

BuildMultiError is an error wrapping multiple validation errors returned by Build.ValidateAll() if the designated constraints aren't met.

func (BuildMultiError) AllErrors

func (m BuildMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BuildMultiError) Error

func (m BuildMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type BuildValidationError

type BuildValidationError struct {
	// contains filtered or unexported fields
}

BuildValidationError is the validation error returned by Build.Validate if the designated constraints aren't met.

func (BuildValidationError) Cause

func (e BuildValidationError) Cause() error

Cause function returns cause value.

func (BuildValidationError) Error

func (e BuildValidationError) Error() string

Error satisfies the builtin error interface

func (BuildValidationError) ErrorName

func (e BuildValidationError) ErrorName() string

ErrorName returns error name.

func (BuildValidationError) Field

func (e BuildValidationError) Field() string

Field function returns field value.

func (BuildValidationError) Key

func (e BuildValidationError) Key() bool

Key function returns key value.

func (BuildValidationError) Reason

func (e BuildValidationError) Reason() string

Reason function returns reason value.

type CPU

type CPU struct {

	// Number of logical cores in the system.
	LogicalCount uint32 `protobuf:"varint,1,opt,name=logical_count,json=logicalCount,proto3" json:"logical_count,omitempty"`
	// Number of physical cores in the system
	PhysicalCount uint32 `protobuf:"varint,2,opt,name=physical_count,json=physicalCount,proto3" json:"physical_count,omitempty"`
	// Percent calculates the percentage of cpu used.
	Percent float64 `protobuf:"fixed64,3,opt,name=percent,proto3" json:"percent,omitempty"`
	// Calculates the percentage of cpu used by process.
	ProcessPercent float64 `protobuf:"fixed64,4,opt,name=process_percent,json=processPercent,proto3" json:"process_percent,omitempty"`
	// CPUTimes contains the amounts of time the CPU has spent performing different kinds of work.
	Times *CPUTimes `protobuf:"bytes,5,opt,name=times,proto3,oneof" json:"times,omitempty"`
	// Cgroup CPU Stat.
	Cgroup *CgroupCPU `protobuf:"bytes,6,opt,name=cgroup,proto3,oneof" json:"cgroup,omitempty"`
	// contains filtered or unexported fields
}

CPU Stat.

func (*CPU) Descriptor deprecated

func (*CPU) Descriptor() ([]byte, []int)

Deprecated: Use CPU.ProtoReflect.Descriptor instead.

func (*CPU) GetCgroup added in v2.2.15

func (x *CPU) GetCgroup() *CgroupCPU

func (*CPU) GetLogicalCount

func (x *CPU) GetLogicalCount() uint32

func (*CPU) GetPercent

func (x *CPU) GetPercent() float64

func (*CPU) GetPhysicalCount

func (x *CPU) GetPhysicalCount() uint32

func (*CPU) GetProcessPercent

func (x *CPU) GetProcessPercent() float64

func (*CPU) GetTimes

func (x *CPU) GetTimes() *CPUTimes

func (*CPU) ProtoMessage

func (*CPU) ProtoMessage()

func (*CPU) ProtoReflect

func (x *CPU) ProtoReflect() protoreflect.Message

func (*CPU) Reset

func (x *CPU) Reset()

func (*CPU) String

func (x *CPU) String() string

func (*CPU) Validate

func (m *CPU) Validate() error

Validate checks the field values on CPU with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CPU) ValidateAll

func (m *CPU) ValidateAll() error

ValidateAll checks the field values on CPU with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CPUMultiError, or nil if none found.

type CPUMultiError

type CPUMultiError []error

CPUMultiError is an error wrapping multiple validation errors returned by CPU.ValidateAll() if the designated constraints aren't met.

func (CPUMultiError) AllErrors

func (m CPUMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CPUMultiError) Error

func (m CPUMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CPUTimes

type CPUTimes struct {

	// CPU time of user.
	User float64 `protobuf:"fixed64,1,opt,name=user,proto3" json:"user,omitempty"`
	// CPU time of system.
	System float64 `protobuf:"fixed64,2,opt,name=system,proto3" json:"system,omitempty"`
	// CPU time of idle.
	Idle float64 `protobuf:"fixed64,3,opt,name=idle,proto3" json:"idle,omitempty"`
	// CPU time of nice.
	Nice float64 `protobuf:"fixed64,4,opt,name=nice,proto3" json:"nice,omitempty"`
	// CPU time of iowait.
	Iowait float64 `protobuf:"fixed64,5,opt,name=iowait,proto3" json:"iowait,omitempty"`
	// CPU time of irq.
	Irq float64 `protobuf:"fixed64,6,opt,name=irq,proto3" json:"irq,omitempty"`
	// CPU time of softirq.
	Softirq float64 `protobuf:"fixed64,7,opt,name=softirq,proto3" json:"softirq,omitempty"`
	// CPU time of steal.
	Steal float64 `protobuf:"fixed64,8,opt,name=steal,proto3" json:"steal,omitempty"`
	// CPU time of guest.
	Guest float64 `protobuf:"fixed64,9,opt,name=guest,proto3" json:"guest,omitempty"`
	// CPU time of guest nice.
	GuestNice float64 `protobuf:"fixed64,10,opt,name=guest_nice,json=guestNice,proto3" json:"guest_nice,omitempty"`
	// contains filtered or unexported fields
}

CPUTimes contains the amounts of time the CPU has spent performing different kinds of work. Time units are in seconds.

func (*CPUTimes) Descriptor deprecated

func (*CPUTimes) Descriptor() ([]byte, []int)

Deprecated: Use CPUTimes.ProtoReflect.Descriptor instead.

func (*CPUTimes) GetGuest

func (x *CPUTimes) GetGuest() float64

func (*CPUTimes) GetGuestNice

func (x *CPUTimes) GetGuestNice() float64

func (*CPUTimes) GetIdle

func (x *CPUTimes) GetIdle() float64

func (*CPUTimes) GetIowait

func (x *CPUTimes) GetIowait() float64

func (*CPUTimes) GetIrq

func (x *CPUTimes) GetIrq() float64

func (*CPUTimes) GetNice

func (x *CPUTimes) GetNice() float64

func (*CPUTimes) GetSoftirq

func (x *CPUTimes) GetSoftirq() float64

func (*CPUTimes) GetSteal

func (x *CPUTimes) GetSteal() float64

func (*CPUTimes) GetSystem

func (x *CPUTimes) GetSystem() float64

func (*CPUTimes) GetUser

func (x *CPUTimes) GetUser() float64

func (*CPUTimes) ProtoMessage

func (*CPUTimes) ProtoMessage()

func (*CPUTimes) ProtoReflect

func (x *CPUTimes) ProtoReflect() protoreflect.Message

func (*CPUTimes) Reset

func (x *CPUTimes) Reset()

func (*CPUTimes) String

func (x *CPUTimes) String() string

func (*CPUTimes) Validate

func (m *CPUTimes) Validate() error

Validate checks the field values on CPUTimes with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CPUTimes) ValidateAll

func (m *CPUTimes) ValidateAll() error

ValidateAll checks the field values on CPUTimes with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CPUTimesMultiError, or nil if none found.

type CPUTimesMultiError

type CPUTimesMultiError []error

CPUTimesMultiError is an error wrapping multiple validation errors returned by CPUTimes.ValidateAll() if the designated constraints aren't met.

func (CPUTimesMultiError) AllErrors

func (m CPUTimesMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CPUTimesMultiError) Error

func (m CPUTimesMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CPUTimesValidationError

type CPUTimesValidationError struct {
	// contains filtered or unexported fields
}

CPUTimesValidationError is the validation error returned by CPUTimes.Validate if the designated constraints aren't met.

func (CPUTimesValidationError) Cause

func (e CPUTimesValidationError) Cause() error

Cause function returns cause value.

func (CPUTimesValidationError) Error

func (e CPUTimesValidationError) Error() string

Error satisfies the builtin error interface

func (CPUTimesValidationError) ErrorName

func (e CPUTimesValidationError) ErrorName() string

ErrorName returns error name.

func (CPUTimesValidationError) Field

func (e CPUTimesValidationError) Field() string

Field function returns field value.

func (CPUTimesValidationError) Key

func (e CPUTimesValidationError) Key() bool

Key function returns key value.

func (CPUTimesValidationError) Reason

func (e CPUTimesValidationError) Reason() string

Reason function returns reason value.

type CPUValidationError

type CPUValidationError struct {
	// contains filtered or unexported fields
}

CPUValidationError is the validation error returned by CPU.Validate if the designated constraints aren't met.

func (CPUValidationError) Cause

func (e CPUValidationError) Cause() error

Cause function returns cause value.

func (CPUValidationError) Error

func (e CPUValidationError) Error() string

Error satisfies the builtin error interface

func (CPUValidationError) ErrorName

func (e CPUValidationError) ErrorName() string

ErrorName returns error name.

func (CPUValidationError) Field

func (e CPUValidationError) Field() string

Field function returns field value.

func (CPUValidationError) Key

func (e CPUValidationError) Key() bool

Key function returns key value.

func (CPUValidationError) Reason

func (e CPUValidationError) Reason() string

Reason function returns reason value.

type CachePeer added in v2.0.116

type CachePeer struct {

	// Peer id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Range is url range of request.
	Range *Range `protobuf:"bytes,2,opt,name=range,proto3,oneof" json:"range,omitempty"`
	// Peer priority.
	Priority Priority `protobuf:"varint,3,opt,name=priority,proto3,enum=common.v2.Priority" json:"priority,omitempty"`
	// Pieces of peer.
	Pieces []*Piece `protobuf:"bytes,4,rep,name=pieces,proto3" json:"pieces,omitempty"`
	// Peer downloads costs time.
	Cost *durationpb.Duration `protobuf:"bytes,5,opt,name=cost,proto3" json:"cost,omitempty"`
	// Peer state.
	State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
	// CacheTask info.
	Task *CacheTask `protobuf:"bytes,7,opt,name=task,proto3" json:"task,omitempty"`
	// Host info.
	Host *Host `protobuf:"bytes,8,opt,name=host,proto3" json:"host,omitempty"`
	// NeedBackToSource needs downloaded from source.
	NeedBackToSource bool `protobuf:"varint,9,opt,name=need_back_to_source,json=needBackToSource,proto3" json:"need_back_to_source,omitempty"`
	// Peer create time.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Peer update time.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// ConcurrentPieceCount is the number of pieces that can be downloaded concurrently.
	ConcurrentPieceCount uint32 `protobuf:"varint,12,opt,name=concurrent_piece_count,json=concurrentPieceCount,proto3" json:"concurrent_piece_count,omitempty"`
	// contains filtered or unexported fields
}

CachePeer metadata.

func (*CachePeer) Descriptor deprecated added in v2.0.116

func (*CachePeer) Descriptor() ([]byte, []int)

Deprecated: Use CachePeer.ProtoReflect.Descriptor instead.

func (*CachePeer) GetConcurrentPieceCount added in v2.1.65

func (x *CachePeer) GetConcurrentPieceCount() uint32

func (*CachePeer) GetCost added in v2.0.116

func (x *CachePeer) GetCost() *durationpb.Duration

func (*CachePeer) GetCreatedAt added in v2.0.116

func (x *CachePeer) GetCreatedAt() *timestamppb.Timestamp

func (*CachePeer) GetHost added in v2.0.116

func (x *CachePeer) GetHost() *Host

func (*CachePeer) GetId added in v2.0.116

func (x *CachePeer) GetId() string

func (*CachePeer) GetNeedBackToSource added in v2.1.50

func (x *CachePeer) GetNeedBackToSource() bool

func (*CachePeer) GetPieces added in v2.1.50

func (x *CachePeer) GetPieces() []*Piece

func (*CachePeer) GetPriority added in v2.1.50

func (x *CachePeer) GetPriority() Priority

func (*CachePeer) GetRange added in v2.1.50

func (x *CachePeer) GetRange() *Range

func (*CachePeer) GetState added in v2.0.116

func (x *CachePeer) GetState() string

func (*CachePeer) GetTask added in v2.0.116

func (x *CachePeer) GetTask() *CacheTask

func (*CachePeer) GetUpdatedAt added in v2.0.116

func (x *CachePeer) GetUpdatedAt() *timestamppb.Timestamp

func (*CachePeer) ProtoMessage added in v2.0.116

func (*CachePeer) ProtoMessage()

func (*CachePeer) ProtoReflect added in v2.0.116

func (x *CachePeer) ProtoReflect() protoreflect.Message

func (*CachePeer) Reset added in v2.0.116

func (x *CachePeer) Reset()

func (*CachePeer) String added in v2.0.116

func (x *CachePeer) String() string

func (*CachePeer) Validate added in v2.0.116

func (m *CachePeer) Validate() error

Validate checks the field values on CachePeer 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 (*CachePeer) ValidateAll added in v2.0.116

func (m *CachePeer) ValidateAll() error

ValidateAll checks the field values on CachePeer 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 CachePeerMultiError, or nil if none found.

type CachePeerMultiError added in v2.0.116

type CachePeerMultiError []error

CachePeerMultiError is an error wrapping multiple validation errors returned by CachePeer.ValidateAll() if the designated constraints aren't met.

func (CachePeerMultiError) AllErrors added in v2.0.116

func (m CachePeerMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CachePeerMultiError) Error added in v2.0.116

func (m CachePeerMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CachePeerValidationError added in v2.0.116

type CachePeerValidationError struct {
	// contains filtered or unexported fields
}

CachePeerValidationError is the validation error returned by CachePeer.Validate if the designated constraints aren't met.

func (CachePeerValidationError) Cause added in v2.0.116

func (e CachePeerValidationError) Cause() error

Cause function returns cause value.

func (CachePeerValidationError) Error added in v2.0.116

func (e CachePeerValidationError) Error() string

Error satisfies the builtin error interface

func (CachePeerValidationError) ErrorName added in v2.0.116

func (e CachePeerValidationError) ErrorName() string

ErrorName returns error name.

func (CachePeerValidationError) Field added in v2.0.116

func (e CachePeerValidationError) Field() string

Field function returns field value.

func (CachePeerValidationError) Key added in v2.0.116

Key function returns key value.

func (CachePeerValidationError) Reason added in v2.0.116

func (e CachePeerValidationError) Reason() string

Reason function returns reason value.

type CacheTask added in v2.0.116

type CacheTask struct {

	// Task id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Task type.
	Type TaskType `protobuf:"varint,2,opt,name=type,proto3,enum=common.v2.TaskType" json:"type,omitempty"`
	// Download url.
	Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	// Verifies task data integrity after download using a digest. Supports CRC32, SHA256, and SHA512 algorithms.
	// Format: `<algorithm>:<hash>`, e.g., `crc32:xxx`, `sha256:yyy`, `sha512:zzz`.
	// Returns an error if the computed digest mismatches the expected value.
	//
	// Performance
	// Digest calculation increases processing time. Enable only when data integrity verification is critical.
	Digest *string `protobuf:"bytes,4,opt,name=digest,proto3,oneof" json:"digest,omitempty"`
	// URL tag identifies different task for same url.
	Tag *string `protobuf:"bytes,5,opt,name=tag,proto3,oneof" json:"tag,omitempty"`
	// Application of task.
	Application *string `protobuf:"bytes,6,opt,name=application,proto3,oneof" json:"application,omitempty"`
	// Filtered query params to generate the task id.
	// When filter is ["Signature", "Expires", "ns"], for example:
	// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
	// will generate the same task id.
	// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
	FilteredQueryParams []string `protobuf:"bytes,7,rep,name=filtered_query_params,json=filteredQueryParams,proto3" json:"filtered_query_params,omitempty"`
	// Task request headers.
	RequestHeader map[string]string `` /* 188-byte string literal not displayed */
	// Task content length.
	ContentLength uint64 `protobuf:"varint,9,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
	// Task piece count.
	PieceCount uint32 `protobuf:"varint,10,opt,name=piece_count,json=pieceCount,proto3" json:"piece_count,omitempty"`
	// Task size scope.
	SizeScope SizeScope `protobuf:"varint,11,opt,name=size_scope,json=sizeScope,proto3,enum=common.v2.SizeScope" json:"size_scope,omitempty"`
	// Pieces of task.
	Pieces []*Piece `protobuf:"bytes,12,rep,name=pieces,proto3" json:"pieces,omitempty"`
	// Task state.
	State string `protobuf:"bytes,13,opt,name=state,proto3" json:"state,omitempty"`
	// Task peer count.
	PeerCount uint32 `protobuf:"varint,14,opt,name=peer_count,json=peerCount,proto3" json:"peer_count,omitempty"`
	// Task contains available peer.
	HasAvailablePeer bool `protobuf:"varint,15,opt,name=has_available_peer,json=hasAvailablePeer,proto3" json:"has_available_peer,omitempty"`
	// Task create time.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Task update time.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

CacheTask metadata.

func (*CacheTask) Descriptor deprecated added in v2.0.116

func (*CacheTask) Descriptor() ([]byte, []int)

Deprecated: Use CacheTask.ProtoReflect.Descriptor instead.

func (*CacheTask) GetApplication added in v2.0.116

func (x *CacheTask) GetApplication() string

func (*CacheTask) GetContentLength added in v2.0.116

func (x *CacheTask) GetContentLength() uint64

func (*CacheTask) GetCreatedAt added in v2.0.116

func (x *CacheTask) GetCreatedAt() *timestamppb.Timestamp

func (*CacheTask) GetDigest added in v2.0.116

func (x *CacheTask) GetDigest() string

func (*CacheTask) GetFilteredQueryParams added in v2.1.50

func (x *CacheTask) GetFilteredQueryParams() []string

func (*CacheTask) GetHasAvailablePeer added in v2.1.50

func (x *CacheTask) GetHasAvailablePeer() bool

func (*CacheTask) GetId added in v2.0.116

func (x *CacheTask) GetId() string

func (*CacheTask) GetPeerCount added in v2.1.50

func (x *CacheTask) GetPeerCount() uint32

func (*CacheTask) GetPieceCount added in v2.0.116

func (x *CacheTask) GetPieceCount() uint32

func (*CacheTask) GetPieces added in v2.1.50

func (x *CacheTask) GetPieces() []*Piece

func (*CacheTask) GetRequestHeader added in v2.1.50

func (x *CacheTask) GetRequestHeader() map[string]string

func (*CacheTask) GetSizeScope added in v2.1.50

func (x *CacheTask) GetSizeScope() SizeScope

func (*CacheTask) GetState added in v2.0.116

func (x *CacheTask) GetState() string

func (*CacheTask) GetTag added in v2.0.116

func (x *CacheTask) GetTag() string

func (*CacheTask) GetType added in v2.1.50

func (x *CacheTask) GetType() TaskType

func (*CacheTask) GetUpdatedAt added in v2.0.116

func (x *CacheTask) GetUpdatedAt() *timestamppb.Timestamp

func (*CacheTask) GetUrl added in v2.1.50

func (x *CacheTask) GetUrl() string

func (*CacheTask) ProtoMessage added in v2.0.116

func (*CacheTask) ProtoMessage()

func (*CacheTask) ProtoReflect added in v2.0.116

func (x *CacheTask) ProtoReflect() protoreflect.Message

func (*CacheTask) Reset added in v2.0.116

func (x *CacheTask) Reset()

func (*CacheTask) String added in v2.0.116

func (x *CacheTask) String() string

func (*CacheTask) Validate added in v2.0.116

func (m *CacheTask) Validate() error

Validate checks the field values on CacheTask 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 (*CacheTask) ValidateAll added in v2.0.116

func (m *CacheTask) ValidateAll() error

ValidateAll checks the field values on CacheTask 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 CacheTaskMultiError, or nil if none found.

type CacheTaskMultiError added in v2.0.116

type CacheTaskMultiError []error

CacheTaskMultiError is an error wrapping multiple validation errors returned by CacheTask.ValidateAll() if the designated constraints aren't met.

func (CacheTaskMultiError) AllErrors added in v2.0.116

func (m CacheTaskMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CacheTaskMultiError) Error added in v2.0.116

func (m CacheTaskMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CacheTaskValidationError added in v2.0.116

type CacheTaskValidationError struct {
	// contains filtered or unexported fields
}

CacheTaskValidationError is the validation error returned by CacheTask.Validate if the designated constraints aren't met.

func (CacheTaskValidationError) Cause added in v2.0.116

func (e CacheTaskValidationError) Cause() error

Cause function returns cause value.

func (CacheTaskValidationError) Error added in v2.0.116

func (e CacheTaskValidationError) Error() string

Error satisfies the builtin error interface

func (CacheTaskValidationError) ErrorName added in v2.0.116

func (e CacheTaskValidationError) ErrorName() string

ErrorName returns error name.

func (CacheTaskValidationError) Field added in v2.0.116

func (e CacheTaskValidationError) Field() string

Field function returns field value.

func (CacheTaskValidationError) Key added in v2.0.116

Key function returns key value.

func (CacheTaskValidationError) Reason added in v2.0.116

func (e CacheTaskValidationError) Reason() string

Reason function returns reason value.

type CgroupCPU added in v2.2.15

type CgroupCPU struct {

	// CFS period in microseconds.
	Period uint64 `protobuf:"varint,1,opt,name=period,proto3" json:"period,omitempty"`
	// CFS quota in microseconds.
	Quota int64 `protobuf:"varint,2,opt,name=quota,proto3" json:"quota,omitempty"`
	// Calculates the percentage of cpu used by cgroup.
	UsedPercent float64 `protobuf:"fixed64,3,opt,name=used_percent,json=usedPercent,proto3" json:"used_percent,omitempty"`
	// contains filtered or unexported fields
}

Cgroup CPU Stat.

func (*CgroupCPU) Descriptor deprecated added in v2.2.15

func (*CgroupCPU) Descriptor() ([]byte, []int)

Deprecated: Use CgroupCPU.ProtoReflect.Descriptor instead.

func (*CgroupCPU) GetPeriod added in v2.2.15

func (x *CgroupCPU) GetPeriod() uint64

func (*CgroupCPU) GetQuota added in v2.2.15

func (x *CgroupCPU) GetQuota() int64

func (*CgroupCPU) GetUsedPercent added in v2.2.18

func (x *CgroupCPU) GetUsedPercent() float64

func (*CgroupCPU) ProtoMessage added in v2.2.15

func (*CgroupCPU) ProtoMessage()

func (*CgroupCPU) ProtoReflect added in v2.2.15

func (x *CgroupCPU) ProtoReflect() protoreflect.Message

func (*CgroupCPU) Reset added in v2.2.15

func (x *CgroupCPU) Reset()

func (*CgroupCPU) String added in v2.2.15

func (x *CgroupCPU) String() string

func (*CgroupCPU) Validate added in v2.2.15

func (m *CgroupCPU) Validate() error

Validate checks the field values on CgroupCPU 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 (*CgroupCPU) ValidateAll added in v2.2.15

func (m *CgroupCPU) ValidateAll() error

ValidateAll checks the field values on CgroupCPU 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 CgroupCPUMultiError, or nil if none found.

type CgroupCPUMultiError added in v2.2.15

type CgroupCPUMultiError []error

CgroupCPUMultiError is an error wrapping multiple validation errors returned by CgroupCPU.ValidateAll() if the designated constraints aren't met.

func (CgroupCPUMultiError) AllErrors added in v2.2.15

func (m CgroupCPUMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CgroupCPUMultiError) Error added in v2.2.15

func (m CgroupCPUMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CgroupCPUValidationError added in v2.2.15

type CgroupCPUValidationError struct {
	// contains filtered or unexported fields
}

CgroupCPUValidationError is the validation error returned by CgroupCPU.Validate if the designated constraints aren't met.

func (CgroupCPUValidationError) Cause added in v2.2.15

func (e CgroupCPUValidationError) Cause() error

Cause function returns cause value.

func (CgroupCPUValidationError) Error added in v2.2.15

func (e CgroupCPUValidationError) Error() string

Error satisfies the builtin error interface

func (CgroupCPUValidationError) ErrorName added in v2.2.15

func (e CgroupCPUValidationError) ErrorName() string

ErrorName returns error name.

func (CgroupCPUValidationError) Field added in v2.2.15

func (e CgroupCPUValidationError) Field() string

Field function returns field value.

func (CgroupCPUValidationError) Key added in v2.2.15

Key function returns key value.

func (CgroupCPUValidationError) Reason added in v2.2.15

func (e CgroupCPUValidationError) Reason() string

Reason function returns reason value.

type CgroupMemory added in v2.2.15

type CgroupMemory struct {

	// Limit is the memory limit in bytes.
	Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	// Usage is the current memory usage in bytes.
	Usage uint64 `protobuf:"varint,2,opt,name=usage,proto3" json:"usage,omitempty"`
	// Calculates the percentage of memory used by cgroup.
	UsedPercent float64 `protobuf:"fixed64,3,opt,name=used_percent,json=usedPercent,proto3" json:"used_percent,omitempty"`
	// contains filtered or unexported fields
}

Cgroup Memory Stat.

func (*CgroupMemory) Descriptor deprecated added in v2.2.15

func (*CgroupMemory) Descriptor() ([]byte, []int)

Deprecated: Use CgroupMemory.ProtoReflect.Descriptor instead.

func (*CgroupMemory) GetLimit added in v2.2.15

func (x *CgroupMemory) GetLimit() int64

func (*CgroupMemory) GetUsage added in v2.2.15

func (x *CgroupMemory) GetUsage() uint64

func (*CgroupMemory) GetUsedPercent added in v2.2.18

func (x *CgroupMemory) GetUsedPercent() float64

func (*CgroupMemory) ProtoMessage added in v2.2.15

func (*CgroupMemory) ProtoMessage()

func (*CgroupMemory) ProtoReflect added in v2.2.15

func (x *CgroupMemory) ProtoReflect() protoreflect.Message

func (*CgroupMemory) Reset added in v2.2.15

func (x *CgroupMemory) Reset()

func (*CgroupMemory) String added in v2.2.15

func (x *CgroupMemory) String() string

func (*CgroupMemory) Validate added in v2.2.15

func (m *CgroupMemory) Validate() error

Validate checks the field values on CgroupMemory 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 (*CgroupMemory) ValidateAll added in v2.2.15

func (m *CgroupMemory) ValidateAll() error

ValidateAll checks the field values on CgroupMemory 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 CgroupMemoryMultiError, or nil if none found.

type CgroupMemoryMultiError added in v2.2.15

type CgroupMemoryMultiError []error

CgroupMemoryMultiError is an error wrapping multiple validation errors returned by CgroupMemory.ValidateAll() if the designated constraints aren't met.

func (CgroupMemoryMultiError) AllErrors added in v2.2.15

func (m CgroupMemoryMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CgroupMemoryMultiError) Error added in v2.2.15

func (m CgroupMemoryMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CgroupMemoryValidationError added in v2.2.15

type CgroupMemoryValidationError struct {
	// contains filtered or unexported fields
}

CgroupMemoryValidationError is the validation error returned by CgroupMemory.Validate if the designated constraints aren't met.

func (CgroupMemoryValidationError) Cause added in v2.2.15

Cause function returns cause value.

func (CgroupMemoryValidationError) Error added in v2.2.15

Error satisfies the builtin error interface

func (CgroupMemoryValidationError) ErrorName added in v2.2.15

func (e CgroupMemoryValidationError) ErrorName() string

ErrorName returns error name.

func (CgroupMemoryValidationError) Field added in v2.2.15

Field function returns field value.

func (CgroupMemoryValidationError) Key added in v2.2.15

Key function returns key value.

func (CgroupMemoryValidationError) Reason added in v2.2.15

Reason function returns reason value.

type Disk

type Disk struct {

	// Total amount of disk on the data path of dragonfly.
	Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	// Free amount of disk on the data path of dragonfly.
	Free uint64 `protobuf:"varint,2,opt,name=free,proto3" json:"free,omitempty"`
	// Used amount of disk on the data path of dragonfly.
	Used uint64 `protobuf:"varint,3,opt,name=used,proto3" json:"used,omitempty"`
	// Used percent of disk on the data path of dragonfly directory.
	UsedPercent float64 `protobuf:"fixed64,4,opt,name=used_percent,json=usedPercent,proto3" json:"used_percent,omitempty"`
	// Total amount of indoes on the data path of dragonfly directory.
	InodesTotal uint64 `protobuf:"varint,5,opt,name=inodes_total,json=inodesTotal,proto3" json:"inodes_total,omitempty"`
	// Used amount of indoes on the data path of dragonfly directory.
	InodesUsed uint64 `protobuf:"varint,6,opt,name=inodes_used,json=inodesUsed,proto3" json:"inodes_used,omitempty"`
	// Free amount of indoes on the data path of dragonfly directory.
	InodesFree uint64 `protobuf:"varint,7,opt,name=inodes_free,json=inodesFree,proto3" json:"inodes_free,omitempty"`
	// Used percent of indoes on the data path of dragonfly directory.
	InodesUsedPercent float64 `protobuf:"fixed64,8,opt,name=inodes_used_percent,json=inodesUsedPercent,proto3" json:"inodes_used_percent,omitempty"`
	// Disk read bandwidth, in bytes per second.
	ReadBandwidth uint64 `protobuf:"varint,9,opt,name=read_bandwidth,json=readBandwidth,proto3" json:"read_bandwidth,omitempty"`
	// Disk write bandwidth, in bytes per second.
	WriteBandwidth uint64 `protobuf:"varint,10,opt,name=write_bandwidth,json=writeBandwidth,proto3" json:"write_bandwidth,omitempty"`
	// contains filtered or unexported fields
}

Disk Stat.

func (*Disk) Descriptor deprecated

func (*Disk) Descriptor() ([]byte, []int)

Deprecated: Use Disk.ProtoReflect.Descriptor instead.

func (*Disk) GetFree

func (x *Disk) GetFree() uint64

func (*Disk) GetInodesFree

func (x *Disk) GetInodesFree() uint64

func (*Disk) GetInodesTotal

func (x *Disk) GetInodesTotal() uint64

func (*Disk) GetInodesUsed

func (x *Disk) GetInodesUsed() uint64

func (*Disk) GetInodesUsedPercent

func (x *Disk) GetInodesUsedPercent() float64

func (*Disk) GetReadBandwidth added in v2.0.171

func (x *Disk) GetReadBandwidth() uint64

func (*Disk) GetTotal

func (x *Disk) GetTotal() uint64

func (*Disk) GetUsed

func (x *Disk) GetUsed() uint64

func (*Disk) GetUsedPercent

func (x *Disk) GetUsedPercent() float64

func (*Disk) GetWriteBandwidth added in v2.0.171

func (x *Disk) GetWriteBandwidth() uint64

func (*Disk) ProtoMessage

func (*Disk) ProtoMessage()

func (*Disk) ProtoReflect

func (x *Disk) ProtoReflect() protoreflect.Message

func (*Disk) Reset

func (x *Disk) Reset()

func (*Disk) String

func (x *Disk) String() string

func (*Disk) Validate

func (m *Disk) Validate() error

Validate checks the field values on Disk with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Disk) ValidateAll

func (m *Disk) ValidateAll() error

ValidateAll checks the field values on Disk with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DiskMultiError, or nil if none found.

type DiskMultiError

type DiskMultiError []error

DiskMultiError is an error wrapping multiple validation errors returned by Disk.ValidateAll() if the designated constraints aren't met.

func (DiskMultiError) AllErrors

func (m DiskMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DiskMultiError) Error

func (m DiskMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DiskValidationError

type DiskValidationError struct {
	// contains filtered or unexported fields
}

DiskValidationError is the validation error returned by Disk.Validate if the designated constraints aren't met.

func (DiskValidationError) Cause

func (e DiskValidationError) Cause() error

Cause function returns cause value.

func (DiskValidationError) Error

func (e DiskValidationError) Error() string

Error satisfies the builtin error interface

func (DiskValidationError) ErrorName

func (e DiskValidationError) ErrorName() string

ErrorName returns error name.

func (DiskValidationError) Field

func (e DiskValidationError) Field() string

Field function returns field value.

func (DiskValidationError) Key

func (e DiskValidationError) Key() bool

Key function returns key value.

func (DiskValidationError) Reason

func (e DiskValidationError) Reason() string

Reason function returns reason value.

type Download

type Download struct {

	// Download url.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// Digest of the task digest, for example blake3:xxx or sha256:yyy.
	Digest *string `protobuf:"bytes,2,opt,name=digest,proto3,oneof" json:"digest,omitempty"`
	// Range is url range of request. If protocol is http, range
	// will set in request header. If protocol is others, range
	// will set in range field.
	Range *Range `protobuf:"bytes,3,opt,name=range,proto3,oneof" json:"range,omitempty"`
	// Task type.
	Type TaskType `protobuf:"varint,4,opt,name=type,proto3,enum=common.v2.TaskType" json:"type,omitempty"`
	// URL tag identifies different task for same url.
	Tag *string `protobuf:"bytes,5,opt,name=tag,proto3,oneof" json:"tag,omitempty"`
	// Application of task.
	Application *string `protobuf:"bytes,6,opt,name=application,proto3,oneof" json:"application,omitempty"`
	// Peer priority.
	Priority Priority `protobuf:"varint,7,opt,name=priority,proto3,enum=common.v2.Priority" json:"priority,omitempty"`
	// Filtered query params to generate the task id.
	// When filter is ["Signature", "Expires", "ns"], for example:
	// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
	// will generate the same task id.
	// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
	FilteredQueryParams []string `protobuf:"bytes,8,rep,name=filtered_query_params,json=filteredQueryParams,proto3" json:"filtered_query_params,omitempty"`
	// Task request headers.
	RequestHeader map[string]string `` /* 188-byte string literal not displayed */
	// Piece Length is the piece length(bytes) for downloading file. The value needs to
	// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
	// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
	// the piece length will be calculated according to the file size.
	PieceLength *uint64 `protobuf:"varint,10,opt,name=piece_length,json=pieceLength,proto3,oneof" json:"piece_length,omitempty"`
	// File path to be downloaded. If output_path is set, the downloaded file will be saved to the specified path.
	// Dfdaemon will try to create hard link to the output path before starting the download. If hard link creation fails,
	// it will copy the file to the output path after the download is completed.
	// For more details refer to https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.
	OutputPath *string `protobuf:"bytes,11,opt,name=output_path,json=outputPath,proto3,oneof" json:"output_path,omitempty"`
	// Download timeout.
	Timeout *durationpb.Duration `protobuf:"bytes,12,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
	// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
	DisableBackToSource bool `protobuf:"varint,13,opt,name=disable_back_to_source,json=disableBackToSource,proto3" json:"disable_back_to_source,omitempty"`
	// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
	NeedBackToSource bool `protobuf:"varint,14,opt,name=need_back_to_source,json=needBackToSource,proto3" json:"need_back_to_source,omitempty"`
	// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
	CertificateChain [][]byte `protobuf:"bytes,15,rep,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"`
	// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
	Prefetch bool `protobuf:"varint,16,opt,name=prefetch,proto3" json:"prefetch,omitempty"`
	// Object storage protocol information.
	ObjectStorage *ObjectStorage `protobuf:"bytes,17,opt,name=object_storage,json=objectStorage,proto3,oneof" json:"object_storage,omitempty"`
	// HDFS protocol information.
	Hdfs *HDFS `protobuf:"bytes,18,opt,name=hdfs,proto3,oneof" json:"hdfs,omitempty"`
	// is_prefetch is the flag to indicate whether the request is a prefetch request.
	IsPrefetch bool `protobuf:"varint,19,opt,name=is_prefetch,json=isPrefetch,proto3" json:"is_prefetch,omitempty"`
	// need_piece_content is the flag to indicate whether the response needs to return piece content.
	NeedPieceContent bool `protobuf:"varint,20,opt,name=need_piece_content,json=needPieceContent,proto3" json:"need_piece_content,omitempty"`
	// force_hard_link is the flag to indicate whether the download file must be hard linked to the output path.
	// For more details refer to https://github.com/dragonflyoss/design/blob/main/systems-analysis/file-download-workflow-with-hard-link/README.md.
	ForceHardLink bool `protobuf:"varint,22,opt,name=force_hard_link,json=forceHardLink,proto3" json:"force_hard_link,omitempty"`
	// content_for_calculating_task_id is the content used to calculate the task id.
	// If content_for_calculating_task_id is set, use its value to calculate the task ID.
	// Otherwise, calculate the task ID based on url, piece_length, tag, application, and filtered_query_params.
	ContentForCalculatingTaskId *string `` /* 155-byte string literal not displayed */
	// remote_ip represents the IP address of the client initiating the download request.
	// For proxy requests, it is set to the IP address of the request source.
	// For dfget requests, it is set to the IP address of the dfget.
	RemoteIp *string `protobuf:"bytes,24,opt,name=remote_ip,json=remoteIp,proto3,oneof" json:"remote_ip,omitempty"`
	// concurrent_piece_count is the number of pieces that can be downloaded concurrently.
	ConcurrentPieceCount *uint32 `` /* 131-byte string literal not displayed */
	// Overwrite indicates whether to overwrite the existing file at output path.
	Overwrite bool `protobuf:"varint,26,opt,name=overwrite,proto3" json:"overwrite,omitempty"`
	// Actual piece length by calculating based on the piece_length field and content length.
	ActualPieceLength *uint64 `protobuf:"varint,27,opt,name=actual_piece_length,json=actualPieceLength,proto3,oneof" json:"actual_piece_length,omitempty"`
	// Actual content length by getting from the backend.
	ActualContentLength *uint64 `` /* 128-byte string literal not displayed */
	// Actual piece count by calculating.
	ActualPieceCount *uint64 `protobuf:"varint,29,opt,name=actual_piece_count,json=actualPieceCount,proto3,oneof" json:"actual_piece_count,omitempty"`
	// enable_task_id_based_blob_digest indicates whether to use the blob digest for task ID calculation
	// when downloading from OCI registries. When enabled for OCI blob URLs (e.g., /v2/<name>/blobs/sha256:<digest>),
	// the task ID is derived from the blob digest rather than the full URL. This enables deduplication across
	// registries - the same blob from different registries shares one task ID, eliminating redundant downloads
	// and storage.
	EnableTaskIdBasedBlobDigest bool `` /* 152-byte string literal not displayed */
	// HuggingFace protocol information.
	HuggingFace *HuggingFace `protobuf:"bytes,31,opt,name=hugging_face,json=huggingFace,proto3,oneof" json:"hugging_face,omitempty"`
	// ModelScope protocol information.
	ModelScope *ModelScope `protobuf:"bytes,32,opt,name=model_scope,json=modelScope,proto3,oneof" json:"model_scope,omitempty"`
	// contains filtered or unexported fields
}

Download information.

func (*Download) Descriptor deprecated

func (*Download) Descriptor() ([]byte, []int)

Deprecated: Use Download.ProtoReflect.Descriptor instead.

func (*Download) GetActualContentLength added in v2.1.77

func (x *Download) GetActualContentLength() uint64

func (*Download) GetActualPieceCount added in v2.1.77

func (x *Download) GetActualPieceCount() uint64

func (*Download) GetActualPieceLength added in v2.1.77

func (x *Download) GetActualPieceLength() uint64

func (*Download) GetApplication

func (x *Download) GetApplication() string

func (*Download) GetCertificateChain added in v2.0.102

func (x *Download) GetCertificateChain() [][]byte

func (*Download) GetConcurrentPieceCount added in v2.1.63

func (x *Download) GetConcurrentPieceCount() uint32

func (*Download) GetContentForCalculatingTaskId added in v2.1.37

func (x *Download) GetContentForCalculatingTaskId() string

func (*Download) GetDigest

func (x *Download) GetDigest() string

func (*Download) GetDisableBackToSource added in v2.0.105

func (x *Download) GetDisableBackToSource() bool

func (*Download) GetEnableTaskIdBasedBlobDigest added in v2.1.87

func (x *Download) GetEnableTaskIdBasedBlobDigest() bool

func (*Download) GetFilteredQueryParams added in v2.0.85

func (x *Download) GetFilteredQueryParams() []string
func (x *Download) GetForceHardLink() bool

func (*Download) GetHdfs added in v2.0.170

func (x *Download) GetHdfs() *HDFS

func (*Download) GetHuggingFace added in v2.2.17

func (x *Download) GetHuggingFace() *HuggingFace

func (*Download) GetIsPrefetch added in v2.0.174

func (x *Download) GetIsPrefetch() bool

func (*Download) GetModelScope added in v2.2.23

func (x *Download) GetModelScope() *ModelScope

func (*Download) GetNeedBackToSource

func (x *Download) GetNeedBackToSource() bool

func (*Download) GetNeedPieceContent added in v2.1.0

func (x *Download) GetNeedPieceContent() bool

func (*Download) GetObjectStorage added in v2.0.127

func (x *Download) GetObjectStorage() *ObjectStorage

func (*Download) GetOutputPath

func (x *Download) GetOutputPath() string

func (*Download) GetOverwrite added in v2.1.70

func (x *Download) GetOverwrite() bool

func (*Download) GetPieceLength

func (x *Download) GetPieceLength() uint64

func (*Download) GetPrefetch added in v2.0.109

func (x *Download) GetPrefetch() bool

func (*Download) GetPriority

func (x *Download) GetPriority() Priority

func (*Download) GetRange

func (x *Download) GetRange() *Range

func (*Download) GetRemoteIp added in v2.1.45

func (x *Download) GetRemoteIp() string

func (*Download) GetRequestHeader added in v2.0.84

func (x *Download) GetRequestHeader() map[string]string

func (*Download) GetTag

func (x *Download) GetTag() string

func (*Download) GetTimeout

func (x *Download) GetTimeout() *durationpb.Duration

func (*Download) GetType

func (x *Download) GetType() TaskType

func (*Download) GetUrl

func (x *Download) GetUrl() string

func (*Download) ProtoMessage

func (*Download) ProtoMessage()

func (*Download) ProtoReflect

func (x *Download) ProtoReflect() protoreflect.Message

func (*Download) Reset

func (x *Download) Reset()

func (*Download) String

func (x *Download) String() string

func (*Download) Validate

func (m *Download) Validate() error

Validate checks the field values on Download with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Download) ValidateAll

func (m *Download) ValidateAll() error

ValidateAll checks the field values on Download 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 DownloadMultiError, or nil if none found.

type DownloadMultiError

type DownloadMultiError []error

DownloadMultiError is an error wrapping multiple validation errors returned by Download.ValidateAll() if the designated constraints aren't met.

func (DownloadMultiError) AllErrors

func (m DownloadMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DownloadMultiError) Error

func (m DownloadMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DownloadValidationError

type DownloadValidationError struct {
	// contains filtered or unexported fields
}

DownloadValidationError is the validation error returned by Download.Validate if the designated constraints aren't met.

func (DownloadValidationError) Cause

func (e DownloadValidationError) Cause() error

Cause function returns cause value.

func (DownloadValidationError) Error

func (e DownloadValidationError) Error() string

Error satisfies the builtin error interface

func (DownloadValidationError) ErrorName

func (e DownloadValidationError) ErrorName() string

ErrorName returns error name.

func (DownloadValidationError) Field

func (e DownloadValidationError) Field() string

Field function returns field value.

func (DownloadValidationError) Key

func (e DownloadValidationError) Key() bool

Key function returns key value.

func (DownloadValidationError) Reason

func (e DownloadValidationError) Reason() string

Reason function returns reason value.

type HDFS added in v2.0.170

type HDFS struct {

	// Delegation token for Web HDFS operator.
	DelegationToken *string `protobuf:"bytes,1,opt,name=delegation_token,json=delegationToken,proto3,oneof" json:"delegation_token,omitempty"`
	// contains filtered or unexported fields
}

HDFS related information.

func (*HDFS) Descriptor deprecated added in v2.0.170

func (*HDFS) Descriptor() ([]byte, []int)

Deprecated: Use HDFS.ProtoReflect.Descriptor instead.

func (*HDFS) GetDelegationToken added in v2.0.170

func (x *HDFS) GetDelegationToken() string

func (*HDFS) ProtoMessage added in v2.0.170

func (*HDFS) ProtoMessage()

func (*HDFS) ProtoReflect added in v2.0.170

func (x *HDFS) ProtoReflect() protoreflect.Message

func (*HDFS) Reset added in v2.0.170

func (x *HDFS) Reset()

func (*HDFS) String added in v2.0.170

func (x *HDFS) String() string

func (*HDFS) Validate added in v2.0.170

func (m *HDFS) Validate() error

Validate checks the field values on HDFS 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 (*HDFS) ValidateAll added in v2.0.170

func (m *HDFS) ValidateAll() error

ValidateAll checks the field values on HDFS 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 HDFSMultiError, or nil if none found.

type HDFSMultiError added in v2.0.170

type HDFSMultiError []error

HDFSMultiError is an error wrapping multiple validation errors returned by HDFS.ValidateAll() if the designated constraints aren't met.

func (HDFSMultiError) AllErrors added in v2.0.170

func (m HDFSMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HDFSMultiError) Error added in v2.0.170

func (m HDFSMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HDFSValidationError added in v2.0.170

type HDFSValidationError struct {
	// contains filtered or unexported fields
}

HDFSValidationError is the validation error returned by HDFS.Validate if the designated constraints aren't met.

func (HDFSValidationError) Cause added in v2.0.170

func (e HDFSValidationError) Cause() error

Cause function returns cause value.

func (HDFSValidationError) Error added in v2.0.170

func (e HDFSValidationError) Error() string

Error satisfies the builtin error interface

func (HDFSValidationError) ErrorName added in v2.0.170

func (e HDFSValidationError) ErrorName() string

ErrorName returns error name.

func (HDFSValidationError) Field added in v2.0.170

func (e HDFSValidationError) Field() string

Field function returns field value.

func (HDFSValidationError) Key added in v2.0.170

func (e HDFSValidationError) Key() bool

Key function returns key value.

func (HDFSValidationError) Reason added in v2.0.170

func (e HDFSValidationError) Reason() string

Reason function returns reason value.

type Host

type Host struct {

	// Host id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Host type.
	Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
	// Hostname.
	Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// Host ip.
	Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`
	// Port of grpc service.
	Port int32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"`
	// Port of download server.
	DownloadPort int32 `protobuf:"varint,6,opt,name=download_port,json=downloadPort,proto3" json:"download_port,omitempty"`
	// Host OS.
	Os string `protobuf:"bytes,7,opt,name=os,proto3" json:"os,omitempty"`
	// Host platform.
	Platform string `protobuf:"bytes,8,opt,name=platform,proto3" json:"platform,omitempty"`
	// Host platform family.
	PlatformFamily string `protobuf:"bytes,9,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"`
	// Host platform version.
	PlatformVersion string `protobuf:"bytes,10,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"`
	// Host kernel version.
	KernelVersion string `protobuf:"bytes,11,opt,name=kernel_version,json=kernelVersion,proto3" json:"kernel_version,omitempty"`
	// CPU Stat.
	Cpu *CPU `protobuf:"bytes,12,opt,name=cpu,proto3,oneof" json:"cpu,omitempty"`
	// Memory Stat.
	Memory *Memory `protobuf:"bytes,13,opt,name=memory,proto3,oneof" json:"memory,omitempty"`
	// Network Stat.
	Network *Network `protobuf:"bytes,14,opt,name=network,proto3,oneof" json:"network,omitempty"`
	// Disk Stat.
	Disk *Disk `protobuf:"bytes,15,opt,name=disk,proto3,oneof" json:"disk,omitempty"`
	// Build information.
	Build *Build `protobuf:"bytes,16,opt,name=build,proto3,oneof" json:"build,omitempty"`
	// ID of the cluster to which the host belongs.
	SchedulerClusterId uint64 `protobuf:"varint,17,opt,name=scheduler_cluster_id,json=schedulerClusterId,proto3" json:"scheduler_cluster_id,omitempty"`
	// Disable shared data for other peers.
	DisableShared bool `protobuf:"varint,18,opt,name=disable_shared,json=disableShared,proto3" json:"disable_shared,omitempty"`
	// Port of proxy server.
	ProxyPort int32 `protobuf:"varint,19,opt,name=proxy_port,json=proxyPort,proto3" json:"proxy_port,omitempty"`
	// Name of the host.
	// Format: ${POD_NAMESPACE}-${POD_NAME}
	Name string `protobuf:"bytes,20,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Host metadata.

func (*Host) Descriptor deprecated

func (*Host) Descriptor() ([]byte, []int)

Deprecated: Use Host.ProtoReflect.Descriptor instead.

func (*Host) GetBuild

func (x *Host) GetBuild() *Build

func (*Host) GetCpu

func (x *Host) GetCpu() *CPU

func (*Host) GetDisableShared added in v2.0.157

func (x *Host) GetDisableShared() bool

func (*Host) GetDisk

func (x *Host) GetDisk() *Disk

func (*Host) GetDownloadPort added in v2.0.3

func (x *Host) GetDownloadPort() int32

func (*Host) GetHostname

func (x *Host) GetHostname() string

func (*Host) GetId

func (x *Host) GetId() string

func (*Host) GetIp

func (x *Host) GetIp() string

func (*Host) GetKernelVersion

func (x *Host) GetKernelVersion() string

func (*Host) GetMemory

func (x *Host) GetMemory() *Memory

func (*Host) GetName added in v2.2.9

func (x *Host) GetName() string

func (*Host) GetNetwork

func (x *Host) GetNetwork() *Network

func (*Host) GetOs

func (x *Host) GetOs() string

func (*Host) GetPlatform

func (x *Host) GetPlatform() string

func (*Host) GetPlatformFamily

func (x *Host) GetPlatformFamily() string

func (*Host) GetPlatformVersion

func (x *Host) GetPlatformVersion() string

func (*Host) GetPort

func (x *Host) GetPort() int32

func (*Host) GetProxyPort added in v2.1.58

func (x *Host) GetProxyPort() int32

func (*Host) GetSchedulerClusterId added in v2.0.21

func (x *Host) GetSchedulerClusterId() uint64

func (*Host) GetType

func (x *Host) GetType() uint32

func (*Host) ProtoMessage

func (*Host) ProtoMessage()

func (*Host) ProtoReflect

func (x *Host) ProtoReflect() protoreflect.Message

func (*Host) Reset

func (x *Host) Reset()

func (*Host) String

func (x *Host) String() string

func (*Host) Validate

func (m *Host) Validate() error

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 (*Host) ValidateAll

func (m *Host) ValidateAll() error

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.

type HostMultiError

type HostMultiError []error

HostMultiError is an error wrapping multiple validation errors returned by Host.ValidateAll() if the designated constraints aren't met.

func (HostMultiError) AllErrors

func (m HostMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HostMultiError) Error

func (m HostMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HostValidationError

type HostValidationError struct {
	// contains filtered or unexported fields
}

HostValidationError is the validation error returned by Host.Validate if the designated constraints aren't met.

func (HostValidationError) Cause

func (e HostValidationError) Cause() error

Cause function returns cause value.

func (HostValidationError) Error

func (e HostValidationError) Error() string

Error satisfies the builtin error interface

func (HostValidationError) ErrorName

func (e HostValidationError) ErrorName() string

ErrorName returns error name.

func (HostValidationError) Field

func (e HostValidationError) Field() string

Field function returns field value.

func (HostValidationError) Key

func (e HostValidationError) Key() bool

Key function returns key value.

func (HostValidationError) Reason

func (e HostValidationError) Reason() string

Reason function returns reason value.

type HuggingFace added in v2.2.17

type HuggingFace struct {

	// Access token for HuggingFace Hub.
	Token *string `protobuf:"bytes,1,opt,name=token,proto3,oneof" json:"token,omitempty"`
	// Revision of the HuggingFace model, dataset, or space. It can be a branch name, tag name, or commit hash. If not specified,
	// it defaults to the repository's default main branch.
	Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	// contains filtered or unexported fields
}

HuggingFace related information.

func (*HuggingFace) Descriptor deprecated added in v2.2.17

func (*HuggingFace) Descriptor() ([]byte, []int)

Deprecated: Use HuggingFace.ProtoReflect.Descriptor instead.

func (*HuggingFace) GetRevision added in v2.2.21

func (x *HuggingFace) GetRevision() string

func (*HuggingFace) GetToken added in v2.2.17

func (x *HuggingFace) GetToken() string

func (*HuggingFace) ProtoMessage added in v2.2.17

func (*HuggingFace) ProtoMessage()

func (*HuggingFace) ProtoReflect added in v2.2.17

func (x *HuggingFace) ProtoReflect() protoreflect.Message

func (*HuggingFace) Reset added in v2.2.17

func (x *HuggingFace) Reset()

func (*HuggingFace) String added in v2.2.17

func (x *HuggingFace) String() string

func (*HuggingFace) Validate added in v2.2.17

func (m *HuggingFace) Validate() error

Validate checks the field values on HuggingFace 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 (*HuggingFace) ValidateAll added in v2.2.17

func (m *HuggingFace) ValidateAll() error

ValidateAll checks the field values on HuggingFace 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 HuggingFaceMultiError, or nil if none found.

type HuggingFaceMultiError added in v2.2.17

type HuggingFaceMultiError []error

HuggingFaceMultiError is an error wrapping multiple validation errors returned by HuggingFace.ValidateAll() if the designated constraints aren't met.

func (HuggingFaceMultiError) AllErrors added in v2.2.17

func (m HuggingFaceMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HuggingFaceMultiError) Error added in v2.2.17

func (m HuggingFaceMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HuggingFaceValidationError added in v2.2.17

type HuggingFaceValidationError struct {
	// contains filtered or unexported fields
}

HuggingFaceValidationError is the validation error returned by HuggingFace.Validate if the designated constraints aren't met.

func (HuggingFaceValidationError) Cause added in v2.2.17

Cause function returns cause value.

func (HuggingFaceValidationError) Error added in v2.2.17

Error satisfies the builtin error interface

func (HuggingFaceValidationError) ErrorName added in v2.2.17

func (e HuggingFaceValidationError) ErrorName() string

ErrorName returns error name.

func (HuggingFaceValidationError) Field added in v2.2.17

Field function returns field value.

func (HuggingFaceValidationError) Key added in v2.2.17

Key function returns key value.

func (HuggingFaceValidationError) Reason added in v2.2.17

Reason function returns reason value.

type Memory

type Memory struct {

	// Total amount of RAM on this system.
	Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	// RAM available for programs to allocate.
	Available uint64 `protobuf:"varint,2,opt,name=available,proto3" json:"available,omitempty"`
	// RAM used by programs.
	Used uint64 `protobuf:"varint,3,opt,name=used,proto3" json:"used,omitempty"`
	// Percentage of RAM used by programs.
	UsedPercent float64 `protobuf:"fixed64,4,opt,name=used_percent,json=usedPercent,proto3" json:"used_percent,omitempty"`
	// Calculates the percentage of memory used by process.
	ProcessUsedPercent float64 `protobuf:"fixed64,5,opt,name=process_used_percent,json=processUsedPercent,proto3" json:"process_used_percent,omitempty"`
	// This is the kernel's notion of free memory.
	Free uint64 `protobuf:"varint,6,opt,name=free,proto3" json:"free,omitempty"`
	// Cgroup Memory Stat.
	Cgroup *CgroupMemory `protobuf:"bytes,7,opt,name=cgroup,proto3,oneof" json:"cgroup,omitempty"`
	// contains filtered or unexported fields
}

Memory Stat.

func (*Memory) Descriptor deprecated

func (*Memory) Descriptor() ([]byte, []int)

Deprecated: Use Memory.ProtoReflect.Descriptor instead.

func (*Memory) GetAvailable

func (x *Memory) GetAvailable() uint64

func (*Memory) GetCgroup added in v2.2.15

func (x *Memory) GetCgroup() *CgroupMemory

func (*Memory) GetFree

func (x *Memory) GetFree() uint64

func (*Memory) GetProcessUsedPercent

func (x *Memory) GetProcessUsedPercent() float64

func (*Memory) GetTotal

func (x *Memory) GetTotal() uint64

func (*Memory) GetUsed

func (x *Memory) GetUsed() uint64

func (*Memory) GetUsedPercent

func (x *Memory) GetUsedPercent() float64

func (*Memory) ProtoMessage

func (*Memory) ProtoMessage()

func (*Memory) ProtoReflect

func (x *Memory) ProtoReflect() protoreflect.Message

func (*Memory) Reset

func (x *Memory) Reset()

func (*Memory) String

func (x *Memory) String() string

func (*Memory) Validate

func (m *Memory) Validate() error

Validate checks the field values on Memory with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Memory) ValidateAll

func (m *Memory) ValidateAll() error

ValidateAll checks the field values on Memory with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MemoryMultiError, or nil if none found.

type MemoryMultiError

type MemoryMultiError []error

MemoryMultiError is an error wrapping multiple validation errors returned by Memory.ValidateAll() if the designated constraints aren't met.

func (MemoryMultiError) AllErrors

func (m MemoryMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MemoryMultiError) Error

func (m MemoryMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type MemoryValidationError

type MemoryValidationError struct {
	// contains filtered or unexported fields
}

MemoryValidationError is the validation error returned by Memory.Validate if the designated constraints aren't met.

func (MemoryValidationError) Cause

func (e MemoryValidationError) Cause() error

Cause function returns cause value.

func (MemoryValidationError) Error

func (e MemoryValidationError) Error() string

Error satisfies the builtin error interface

func (MemoryValidationError) ErrorName

func (e MemoryValidationError) ErrorName() string

ErrorName returns error name.

func (MemoryValidationError) Field

func (e MemoryValidationError) Field() string

Field function returns field value.

func (MemoryValidationError) Key

func (e MemoryValidationError) Key() bool

Key function returns key value.

func (MemoryValidationError) Reason

func (e MemoryValidationError) Reason() string

Reason function returns reason value.

type ModelScope added in v2.2.23

type ModelScope struct {

	// Access token for ModelScope Hub.
	Token *string `protobuf:"bytes,1,opt,name=token,proto3,oneof" json:"token,omitempty"`
	// Revision of the ModelScope model, dataset, or space. It can be a branch name, tag name, or commit hash. If not specified,
	// it defaults to the repository's default main branch.
	Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	// contains filtered or unexported fields
}

ModelScope related information.

func (*ModelScope) Descriptor deprecated added in v2.2.23

func (*ModelScope) Descriptor() ([]byte, []int)

Deprecated: Use ModelScope.ProtoReflect.Descriptor instead.

func (*ModelScope) GetRevision added in v2.2.23

func (x *ModelScope) GetRevision() string

func (*ModelScope) GetToken added in v2.2.23

func (x *ModelScope) GetToken() string

func (*ModelScope) ProtoMessage added in v2.2.23

func (*ModelScope) ProtoMessage()

func (*ModelScope) ProtoReflect added in v2.2.23

func (x *ModelScope) ProtoReflect() protoreflect.Message

func (*ModelScope) Reset added in v2.2.23

func (x *ModelScope) Reset()

func (*ModelScope) String added in v2.2.23

func (x *ModelScope) String() string

func (*ModelScope) Validate added in v2.2.23

func (m *ModelScope) Validate() error

Validate checks the field values on ModelScope 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 (*ModelScope) ValidateAll added in v2.2.23

func (m *ModelScope) ValidateAll() error

ValidateAll checks the field values on ModelScope 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 ModelScopeMultiError, or nil if none found.

type ModelScopeMultiError added in v2.2.23

type ModelScopeMultiError []error

ModelScopeMultiError is an error wrapping multiple validation errors returned by ModelScope.ValidateAll() if the designated constraints aren't met.

func (ModelScopeMultiError) AllErrors added in v2.2.23

func (m ModelScopeMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ModelScopeMultiError) Error added in v2.2.23

func (m ModelScopeMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ModelScopeValidationError added in v2.2.23

type ModelScopeValidationError struct {
	// contains filtered or unexported fields
}

ModelScopeValidationError is the validation error returned by ModelScope.Validate if the designated constraints aren't met.

func (ModelScopeValidationError) Cause added in v2.2.23

func (e ModelScopeValidationError) Cause() error

Cause function returns cause value.

func (ModelScopeValidationError) Error added in v2.2.23

Error satisfies the builtin error interface

func (ModelScopeValidationError) ErrorName added in v2.2.23

func (e ModelScopeValidationError) ErrorName() string

ErrorName returns error name.

func (ModelScopeValidationError) Field added in v2.2.23

Field function returns field value.

func (ModelScopeValidationError) Key added in v2.2.23

Key function returns key value.

func (ModelScopeValidationError) Reason added in v2.2.23

func (e ModelScopeValidationError) Reason() string

Reason function returns reason value.

type Network

type Network struct {

	// Return count of tcp connections opened and status is ESTABLISHED.
	TcpConnectionCount uint32 `protobuf:"varint,1,opt,name=tcp_connection_count,json=tcpConnectionCount,proto3" json:"tcp_connection_count,omitempty"`
	// Return count of upload tcp connections opened and status is ESTABLISHED.
	UploadTcpConnectionCount uint32 `` /* 138-byte string literal not displayed */
	// Location path(area|country|province|city|...).
	Location *string `protobuf:"bytes,3,opt,name=location,proto3,oneof" json:"location,omitempty"`
	// IDC where the peer host is located
	Idc *string `protobuf:"bytes,4,opt,name=idc,proto3,oneof" json:"idc,omitempty"`
	// Maximum bandwidth of the network interface, in bps (bits per second).
	MaxRxBandwidth uint64 `protobuf:"varint,9,opt,name=max_rx_bandwidth,json=maxRxBandwidth,proto3" json:"max_rx_bandwidth,omitempty"`
	// Receive bandwidth of the network interface, in bps (bits per second).
	RxBandwidth *uint64 `protobuf:"varint,10,opt,name=rx_bandwidth,json=rxBandwidth,proto3,oneof" json:"rx_bandwidth,omitempty"`
	// Maximum bandwidth of the network interface for transmission, in bps (bits per second).
	MaxTxBandwidth uint64 `protobuf:"varint,11,opt,name=max_tx_bandwidth,json=maxTxBandwidth,proto3" json:"max_tx_bandwidth,omitempty"`
	// Transmit bandwidth of the network interface, in bps (bits per second).
	TxBandwidth *uint64 `protobuf:"varint,12,opt,name=tx_bandwidth,json=txBandwidth,proto3,oneof" json:"tx_bandwidth,omitempty"`
	// contains filtered or unexported fields
}

Network Stat.

func (*Network) Descriptor deprecated

func (*Network) Descriptor() ([]byte, []int)

Deprecated: Use Network.ProtoReflect.Descriptor instead.

func (*Network) GetIdc

func (x *Network) GetIdc() string

func (*Network) GetLocation

func (x *Network) GetLocation() string

func (*Network) GetMaxRxBandwidth added in v2.1.56

func (x *Network) GetMaxRxBandwidth() uint64

func (*Network) GetMaxTxBandwidth added in v2.1.56

func (x *Network) GetMaxTxBandwidth() uint64

func (*Network) GetRxBandwidth added in v2.1.56

func (x *Network) GetRxBandwidth() uint64

func (*Network) GetTcpConnectionCount

func (x *Network) GetTcpConnectionCount() uint32

func (*Network) GetTxBandwidth added in v2.1.56

func (x *Network) GetTxBandwidth() uint64

func (*Network) GetUploadTcpConnectionCount

func (x *Network) GetUploadTcpConnectionCount() uint32

func (*Network) ProtoMessage

func (*Network) ProtoMessage()

func (*Network) ProtoReflect

func (x *Network) ProtoReflect() protoreflect.Message

func (*Network) Reset

func (x *Network) Reset()

func (*Network) String

func (x *Network) String() string

func (*Network) Validate

func (m *Network) Validate() error

Validate checks the field values on Network with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Network) ValidateAll

func (m *Network) ValidateAll() error

ValidateAll checks the field values on Network with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in NetworkMultiError, or nil if none found.

type NetworkMultiError

type NetworkMultiError []error

NetworkMultiError is an error wrapping multiple validation errors returned by Network.ValidateAll() if the designated constraints aren't met.

func (NetworkMultiError) AllErrors

func (m NetworkMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (NetworkMultiError) Error

func (m NetworkMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type NetworkValidationError

type NetworkValidationError struct {
	// contains filtered or unexported fields
}

NetworkValidationError is the validation error returned by Network.Validate if the designated constraints aren't met.

func (NetworkValidationError) Cause

func (e NetworkValidationError) Cause() error

Cause function returns cause value.

func (NetworkValidationError) Error

func (e NetworkValidationError) Error() string

Error satisfies the builtin error interface

func (NetworkValidationError) ErrorName

func (e NetworkValidationError) ErrorName() string

ErrorName returns error name.

func (NetworkValidationError) Field

func (e NetworkValidationError) Field() string

Field function returns field value.

func (NetworkValidationError) Key

func (e NetworkValidationError) Key() bool

Key function returns key value.

func (NetworkValidationError) Reason

func (e NetworkValidationError) Reason() string

Reason function returns reason value.

type ObjectStorage added in v2.0.127

type ObjectStorage struct {

	// Region is the region of the object storage service.
	Region *string `protobuf:"bytes,1,opt,name=region,proto3,oneof" json:"region,omitempty"`
	// Endpoint is the endpoint of the object storage service.
	Endpoint *string `protobuf:"bytes,2,opt,name=endpoint,proto3,oneof" json:"endpoint,omitempty"`
	// Access key that used to access the object storage service.
	AccessKeyId *string `protobuf:"bytes,3,opt,name=access_key_id,json=accessKeyId,proto3,oneof" json:"access_key_id,omitempty"`
	// Access secret that used to access the object storage service.
	AccessKeySecret *string `protobuf:"bytes,4,opt,name=access_key_secret,json=accessKeySecret,proto3,oneof" json:"access_key_secret,omitempty"`
	// Session token that used to access s3 storage service.
	SessionToken *string `protobuf:"bytes,5,opt,name=session_token,json=sessionToken,proto3,oneof" json:"session_token,omitempty"`
	// Local path to credential file for Google Cloud Storage service OAuth2 authentication.
	CredentialPath *string `protobuf:"bytes,6,opt,name=credential_path,json=credentialPath,proto3,oneof" json:"credential_path,omitempty"`
	// Predefined ACL that used for the Google Cloud Storage service.
	PredefinedAcl *string `protobuf:"bytes,7,opt,name=predefined_acl,json=predefinedAcl,proto3,oneof" json:"predefined_acl,omitempty"`
	// Temporary STS security token for accessing OSS.
	SecurityToken *string `protobuf:"bytes,8,opt,name=security_token,json=securityToken,proto3,oneof" json:"security_token,omitempty"`
	// Insecure skip verify indicates whether to skip verifying the server's certificate chain.
	InsecureSkipVerify *bool `protobuf:"varint,9,opt,name=insecure_skip_verify,json=insecureSkipVerify,proto3,oneof" json:"insecure_skip_verify,omitempty"`
	// contains filtered or unexported fields
}

Object Storage related information.

func (*ObjectStorage) Descriptor deprecated added in v2.0.127

func (*ObjectStorage) Descriptor() ([]byte, []int)

Deprecated: Use ObjectStorage.ProtoReflect.Descriptor instead.

func (*ObjectStorage) GetAccessKeyId added in v2.0.127

func (x *ObjectStorage) GetAccessKeyId() string

func (*ObjectStorage) GetAccessKeySecret added in v2.0.127

func (x *ObjectStorage) GetAccessKeySecret() string

func (*ObjectStorage) GetCredentialPath added in v2.0.151

func (x *ObjectStorage) GetCredentialPath() string

func (*ObjectStorage) GetEndpoint added in v2.0.135

func (x *ObjectStorage) GetEndpoint() string

func (*ObjectStorage) GetInsecureSkipVerify added in v2.2.12

func (x *ObjectStorage) GetInsecureSkipVerify() bool

func (*ObjectStorage) GetPredefinedAcl added in v2.0.137

func (x *ObjectStorage) GetPredefinedAcl() string

func (*ObjectStorage) GetRegion added in v2.0.135

func (x *ObjectStorage) GetRegion() string

func (*ObjectStorage) GetSecurityToken added in v2.1.61

func (x *ObjectStorage) GetSecurityToken() string

func (*ObjectStorage) GetSessionToken added in v2.0.132

func (x *ObjectStorage) GetSessionToken() string

func (*ObjectStorage) ProtoMessage added in v2.0.127

func (*ObjectStorage) ProtoMessage()

func (*ObjectStorage) ProtoReflect added in v2.0.127

func (x *ObjectStorage) ProtoReflect() protoreflect.Message

func (*ObjectStorage) Reset added in v2.0.127

func (x *ObjectStorage) Reset()

func (*ObjectStorage) String added in v2.0.127

func (x *ObjectStorage) String() string

func (*ObjectStorage) Validate added in v2.0.127

func (m *ObjectStorage) Validate() error

Validate checks the field values on ObjectStorage 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 (*ObjectStorage) ValidateAll added in v2.0.127

func (m *ObjectStorage) ValidateAll() error

ValidateAll checks the field values on ObjectStorage 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 ObjectStorageMultiError, or nil if none found.

type ObjectStorageMultiError added in v2.0.127

type ObjectStorageMultiError []error

ObjectStorageMultiError is an error wrapping multiple validation errors returned by ObjectStorage.ValidateAll() if the designated constraints aren't met.

func (ObjectStorageMultiError) AllErrors added in v2.0.127

func (m ObjectStorageMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ObjectStorageMultiError) Error added in v2.0.127

func (m ObjectStorageMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ObjectStorageValidationError added in v2.0.127

type ObjectStorageValidationError struct {
	// contains filtered or unexported fields
}

ObjectStorageValidationError is the validation error returned by ObjectStorage.Validate if the designated constraints aren't met.

func (ObjectStorageValidationError) Cause added in v2.0.127

Cause function returns cause value.

func (ObjectStorageValidationError) Error added in v2.0.127

Error satisfies the builtin error interface

func (ObjectStorageValidationError) ErrorName added in v2.0.127

func (e ObjectStorageValidationError) ErrorName() string

ErrorName returns error name.

func (ObjectStorageValidationError) Field added in v2.0.127

Field function returns field value.

func (ObjectStorageValidationError) Key added in v2.0.127

Key function returns key value.

func (ObjectStorageValidationError) Reason added in v2.0.127

Reason function returns reason value.

type Peer

type Peer struct {

	// Peer id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Range is url range of request.
	Range *Range `protobuf:"bytes,2,opt,name=range,proto3,oneof" json:"range,omitempty"`
	// Peer priority.
	Priority Priority `protobuf:"varint,3,opt,name=priority,proto3,enum=common.v2.Priority" json:"priority,omitempty"`
	// Pieces of peer.
	Pieces []*Piece `protobuf:"bytes,4,rep,name=pieces,proto3" json:"pieces,omitempty"`
	// Peer downloads costs time.
	Cost *durationpb.Duration `protobuf:"bytes,5,opt,name=cost,proto3" json:"cost,omitempty"`
	// Peer state.
	State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
	// Task info.
	Task *Task `protobuf:"bytes,7,opt,name=task,proto3" json:"task,omitempty"`
	// Host info.
	Host *Host `protobuf:"bytes,8,opt,name=host,proto3" json:"host,omitempty"`
	// NeedBackToSource needs downloaded from source.
	NeedBackToSource bool `protobuf:"varint,9,opt,name=need_back_to_source,json=needBackToSource,proto3" json:"need_back_to_source,omitempty"`
	// Peer create time.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Peer update time.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// ConcurrentPieceCount is the number of pieces that can be downloaded concurrently.
	ConcurrentPieceCount uint32 `protobuf:"varint,12,opt,name=concurrent_piece_count,json=concurrentPieceCount,proto3" json:"concurrent_piece_count,omitempty"`
	// contains filtered or unexported fields
}

Peer metadata.

func (*Peer) Descriptor deprecated

func (*Peer) Descriptor() ([]byte, []int)

Deprecated: Use Peer.ProtoReflect.Descriptor instead.

func (*Peer) GetConcurrentPieceCount added in v2.1.65

func (x *Peer) GetConcurrentPieceCount() uint32

func (*Peer) GetCost

func (x *Peer) GetCost() *durationpb.Duration

func (*Peer) GetCreatedAt

func (x *Peer) GetCreatedAt() *timestamppb.Timestamp

func (*Peer) GetHost

func (x *Peer) GetHost() *Host

func (*Peer) GetId

func (x *Peer) GetId() string

func (*Peer) GetNeedBackToSource

func (x *Peer) GetNeedBackToSource() bool

func (*Peer) GetPieces

func (x *Peer) GetPieces() []*Piece

func (*Peer) GetPriority

func (x *Peer) GetPriority() Priority

func (*Peer) GetRange

func (x *Peer) GetRange() *Range

func (*Peer) GetState

func (x *Peer) GetState() string

func (*Peer) GetTask

func (x *Peer) GetTask() *Task

func (*Peer) GetUpdatedAt

func (x *Peer) GetUpdatedAt() *timestamppb.Timestamp

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) ProtoReflect

func (x *Peer) ProtoReflect() protoreflect.Message

func (*Peer) Reset

func (x *Peer) Reset()

func (*Peer) String

func (x *Peer) String() string

func (*Peer) Validate

func (m *Peer) Validate() error

Validate checks the field values on Peer 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 (*Peer) ValidateAll

func (m *Peer) ValidateAll() error

ValidateAll checks the field values on Peer 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 PeerMultiError, or nil if none found.

type PeerMultiError

type PeerMultiError []error

PeerMultiError is an error wrapping multiple validation errors returned by Peer.ValidateAll() if the designated constraints aren't met.

func (PeerMultiError) AllErrors

func (m PeerMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PeerMultiError) Error

func (m PeerMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PeerValidationError

type PeerValidationError struct {
	// contains filtered or unexported fields
}

PeerValidationError is the validation error returned by Peer.Validate if the designated constraints aren't met.

func (PeerValidationError) Cause

func (e PeerValidationError) Cause() error

Cause function returns cause value.

func (PeerValidationError) Error

func (e PeerValidationError) Error() string

Error satisfies the builtin error interface

func (PeerValidationError) ErrorName

func (e PeerValidationError) ErrorName() string

ErrorName returns error name.

func (PeerValidationError) Field

func (e PeerValidationError) Field() string

Field function returns field value.

func (PeerValidationError) Key

func (e PeerValidationError) Key() bool

Key function returns key value.

func (PeerValidationError) Reason

func (e PeerValidationError) Reason() string

Reason function returns reason value.

type PersistentCachePeer added in v2.0.161

type PersistentCachePeer struct {

	// Peer id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Persistent represents whether the persistent cache peer is persistent.
	// If the persistent cache peer is persistent, the persistent cache peer will
	// not be deleted when dfdaemon runs garbage collection. It only be deleted
	// when the task is deleted by the user.
	Persistent bool `protobuf:"varint,2,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// Peer downloads costs time.
	Cost *durationpb.Duration `protobuf:"bytes,3,opt,name=cost,proto3" json:"cost,omitempty"`
	// Peer state.
	State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"`
	// Task info.
	Task *PersistentCacheTask `protobuf:"bytes,5,opt,name=task,proto3" json:"task,omitempty"`
	// Host info.
	Host *Host `protobuf:"bytes,6,opt,name=host,proto3" json:"host,omitempty"`
	// Peer create time.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Peer update time.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// ConcurrentPieceCount is the number of pieces that can be downloaded concurrently.
	ConcurrentPieceCount uint32 `protobuf:"varint,9,opt,name=concurrent_piece_count,json=concurrentPieceCount,proto3" json:"concurrent_piece_count,omitempty"`
	// contains filtered or unexported fields
}

PersistentCachePeer metadata.

func (*PersistentCachePeer) Descriptor deprecated added in v2.0.161

func (*PersistentCachePeer) Descriptor() ([]byte, []int)

Deprecated: Use PersistentCachePeer.ProtoReflect.Descriptor instead.

func (*PersistentCachePeer) GetConcurrentPieceCount added in v2.1.65

func (x *PersistentCachePeer) GetConcurrentPieceCount() uint32

func (*PersistentCachePeer) GetCost added in v2.0.161

func (x *PersistentCachePeer) GetCost() *durationpb.Duration

func (*PersistentCachePeer) GetCreatedAt added in v2.0.161

func (x *PersistentCachePeer) GetCreatedAt() *timestamppb.Timestamp

func (*PersistentCachePeer) GetHost added in v2.0.161

func (x *PersistentCachePeer) GetHost() *Host

func (*PersistentCachePeer) GetId added in v2.0.161

func (x *PersistentCachePeer) GetId() string

func (*PersistentCachePeer) GetPersistent added in v2.0.161

func (x *PersistentCachePeer) GetPersistent() bool

func (*PersistentCachePeer) GetState added in v2.0.161

func (x *PersistentCachePeer) GetState() string

func (*PersistentCachePeer) GetTask added in v2.0.161

func (*PersistentCachePeer) GetUpdatedAt added in v2.0.161

func (x *PersistentCachePeer) GetUpdatedAt() *timestamppb.Timestamp

func (*PersistentCachePeer) ProtoMessage added in v2.0.161

func (*PersistentCachePeer) ProtoMessage()

func (*PersistentCachePeer) ProtoReflect added in v2.0.161

func (x *PersistentCachePeer) ProtoReflect() protoreflect.Message

func (*PersistentCachePeer) Reset added in v2.0.161

func (x *PersistentCachePeer) Reset()

func (*PersistentCachePeer) String added in v2.0.161

func (x *PersistentCachePeer) String() string

func (*PersistentCachePeer) Validate added in v2.0.161

func (m *PersistentCachePeer) Validate() error

Validate checks the field values on PersistentCachePeer 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 (*PersistentCachePeer) ValidateAll added in v2.0.161

func (m *PersistentCachePeer) ValidateAll() error

ValidateAll checks the field values on PersistentCachePeer 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 PersistentCachePeerMultiError, or nil if none found.

type PersistentCachePeerMultiError added in v2.0.161

type PersistentCachePeerMultiError []error

PersistentCachePeerMultiError is an error wrapping multiple validation errors returned by PersistentCachePeer.ValidateAll() if the designated constraints aren't met.

func (PersistentCachePeerMultiError) AllErrors added in v2.0.161

func (m PersistentCachePeerMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PersistentCachePeerMultiError) Error added in v2.0.161

Error returns a concatenation of all the error messages it wraps.

type PersistentCachePeerValidationError added in v2.0.161

type PersistentCachePeerValidationError struct {
	// contains filtered or unexported fields
}

PersistentCachePeerValidationError is the validation error returned by PersistentCachePeer.Validate if the designated constraints aren't met.

func (PersistentCachePeerValidationError) Cause added in v2.0.161

Cause function returns cause value.

func (PersistentCachePeerValidationError) Error added in v2.0.161

Error satisfies the builtin error interface

func (PersistentCachePeerValidationError) ErrorName added in v2.0.161

ErrorName returns error name.

func (PersistentCachePeerValidationError) Field added in v2.0.161

Field function returns field value.

func (PersistentCachePeerValidationError) Key added in v2.0.161

Key function returns key value.

func (PersistentCachePeerValidationError) Reason added in v2.0.161

Reason function returns reason value.

type PersistentCacheTask added in v2.0.161

type PersistentCacheTask struct {

	// Task id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Replica count of the persistent cache task. The persistent cache task will
	// not be deleted when dfdamon runs garbage collection. It only be deleted
	// when the task is deleted by the user.
	PersistentReplicaCount uint64 `` /* 130-byte string literal not displayed */
	// Current replica count of the persistent cache task. The persistent cache task
	// will not be deleted when dfdaemon runs garbage collection. It only be deleted
	// when the task is deleted by the user.
	CurrentPersistentReplicaCount uint64 `` /* 153-byte string literal not displayed */
	// Current replica count of the cache task. If cache task is not persistent,
	// the persistent cache task will be deleted when dfdaemon runs garbage collection.
	CurrentReplicaCount uint64 `protobuf:"varint,4,opt,name=current_replica_count,json=currentReplicaCount,proto3" json:"current_replica_count,omitempty"`
	// Tag is used to distinguish different persistent cache tasks.
	Tag *string `protobuf:"bytes,5,opt,name=tag,proto3,oneof" json:"tag,omitempty"`
	// Application of task.
	Application *string `protobuf:"bytes,6,opt,name=application,proto3,oneof" json:"application,omitempty"`
	// Task piece length.
	PieceLength uint64 `protobuf:"varint,7,opt,name=piece_length,json=pieceLength,proto3" json:"piece_length,omitempty"`
	// Task content length.
	ContentLength uint64 `protobuf:"varint,8,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
	// Task piece count.
	PieceCount uint32 `protobuf:"varint,9,opt,name=piece_count,json=pieceCount,proto3" json:"piece_count,omitempty"`
	// Task state.
	State string `protobuf:"bytes,10,opt,name=state,proto3" json:"state,omitempty"`
	// TTL of the persistent cache task.
	Ttl *durationpb.Duration `protobuf:"bytes,11,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// Task create time.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Task update time.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

PersistentCacheTask metadata.

func (*PersistentCacheTask) Descriptor deprecated added in v2.0.161

func (*PersistentCacheTask) Descriptor() ([]byte, []int)

Deprecated: Use PersistentCacheTask.ProtoReflect.Descriptor instead.

func (*PersistentCacheTask) GetApplication added in v2.0.161

func (x *PersistentCacheTask) GetApplication() string

func (*PersistentCacheTask) GetContentLength added in v2.0.161

func (x *PersistentCacheTask) GetContentLength() uint64

func (*PersistentCacheTask) GetCreatedAt added in v2.0.161

func (x *PersistentCacheTask) GetCreatedAt() *timestamppb.Timestamp

func (*PersistentCacheTask) GetCurrentPersistentReplicaCount added in v2.0.169

func (x *PersistentCacheTask) GetCurrentPersistentReplicaCount() uint64

func (*PersistentCacheTask) GetCurrentReplicaCount added in v2.0.169

func (x *PersistentCacheTask) GetCurrentReplicaCount() uint64

func (*PersistentCacheTask) GetId added in v2.0.161

func (x *PersistentCacheTask) GetId() string

func (*PersistentCacheTask) GetPersistentReplicaCount added in v2.0.161

func (x *PersistentCacheTask) GetPersistentReplicaCount() uint64

func (*PersistentCacheTask) GetPieceCount added in v2.0.161

func (x *PersistentCacheTask) GetPieceCount() uint32

func (*PersistentCacheTask) GetPieceLength added in v2.0.161

func (x *PersistentCacheTask) GetPieceLength() uint64

func (*PersistentCacheTask) GetState added in v2.0.161

func (x *PersistentCacheTask) GetState() string

func (*PersistentCacheTask) GetTag added in v2.0.161

func (x *PersistentCacheTask) GetTag() string

func (*PersistentCacheTask) GetTtl added in v2.1.25

func (*PersistentCacheTask) GetUpdatedAt added in v2.0.161

func (x *PersistentCacheTask) GetUpdatedAt() *timestamppb.Timestamp

func (*PersistentCacheTask) ProtoMessage added in v2.0.161

func (*PersistentCacheTask) ProtoMessage()

func (*PersistentCacheTask) ProtoReflect added in v2.0.161

func (x *PersistentCacheTask) ProtoReflect() protoreflect.Message

func (*PersistentCacheTask) Reset added in v2.0.161

func (x *PersistentCacheTask) Reset()

func (*PersistentCacheTask) String added in v2.0.161

func (x *PersistentCacheTask) String() string

func (*PersistentCacheTask) Validate added in v2.0.161

func (m *PersistentCacheTask) Validate() error

Validate checks the field values on PersistentCacheTask 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 (*PersistentCacheTask) ValidateAll added in v2.0.161

func (m *PersistentCacheTask) ValidateAll() error

ValidateAll checks the field values on PersistentCacheTask 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 PersistentCacheTaskMultiError, or nil if none found.

type PersistentCacheTaskMultiError added in v2.0.161

type PersistentCacheTaskMultiError []error

PersistentCacheTaskMultiError is an error wrapping multiple validation errors returned by PersistentCacheTask.ValidateAll() if the designated constraints aren't met.

func (PersistentCacheTaskMultiError) AllErrors added in v2.0.161

func (m PersistentCacheTaskMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PersistentCacheTaskMultiError) Error added in v2.0.161

Error returns a concatenation of all the error messages it wraps.

type PersistentCacheTaskValidationError added in v2.0.161

type PersistentCacheTaskValidationError struct {
	// contains filtered or unexported fields
}

PersistentCacheTaskValidationError is the validation error returned by PersistentCacheTask.Validate if the designated constraints aren't met.

func (PersistentCacheTaskValidationError) Cause added in v2.0.161

Cause function returns cause value.

func (PersistentCacheTaskValidationError) Error added in v2.0.161

Error satisfies the builtin error interface

func (PersistentCacheTaskValidationError) ErrorName added in v2.0.161

ErrorName returns error name.

func (PersistentCacheTaskValidationError) Field added in v2.0.161

Field function returns field value.

func (PersistentCacheTaskValidationError) Key added in v2.0.161

Key function returns key value.

func (PersistentCacheTaskValidationError) Reason added in v2.0.161

Reason function returns reason value.

type PersistentPeer added in v2.1.86

type PersistentPeer struct {

	// Peer id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Persistent represents whether the persistent peer is persistent.
	// If the persistent peer is persistent, the persistent peer will
	// not be deleted when dfdaemon runs garbage collection. It only be deleted
	// when the task is deleted by the user.
	Persistent bool `protobuf:"varint,2,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// Peer downloads costs time.
	Cost *durationpb.Duration `protobuf:"bytes,3,opt,name=cost,proto3" json:"cost,omitempty"`
	// Peer state.
	State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"`
	// Persistent task info.
	Task *PersistentTask `protobuf:"bytes,5,opt,name=task,proto3" json:"task,omitempty"`
	// Host info.
	Host *Host `protobuf:"bytes,6,opt,name=host,proto3" json:"host,omitempty"`
	// Peer create time.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Peer update time.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// ConcurrentPieceCount is the number of pieces that can be downloaded concurrently.
	ConcurrentPieceCount uint32 `protobuf:"varint,9,opt,name=concurrent_piece_count,json=concurrentPieceCount,proto3" json:"concurrent_piece_count,omitempty"`
	// contains filtered or unexported fields
}

PersistentPeer metadata.

func (*PersistentPeer) Descriptor deprecated added in v2.1.86

func (*PersistentPeer) Descriptor() ([]byte, []int)

Deprecated: Use PersistentPeer.ProtoReflect.Descriptor instead.

func (*PersistentPeer) GetConcurrentPieceCount added in v2.1.86

func (x *PersistentPeer) GetConcurrentPieceCount() uint32

func (*PersistentPeer) GetCost added in v2.1.86

func (x *PersistentPeer) GetCost() *durationpb.Duration

func (*PersistentPeer) GetCreatedAt added in v2.1.86

func (x *PersistentPeer) GetCreatedAt() *timestamppb.Timestamp

func (*PersistentPeer) GetHost added in v2.1.86

func (x *PersistentPeer) GetHost() *Host

func (*PersistentPeer) GetId added in v2.1.86

func (x *PersistentPeer) GetId() string

func (*PersistentPeer) GetPersistent added in v2.1.86

func (x *PersistentPeer) GetPersistent() bool

func (*PersistentPeer) GetState added in v2.1.86

func (x *PersistentPeer) GetState() string

func (*PersistentPeer) GetTask added in v2.1.86

func (x *PersistentPeer) GetTask() *PersistentTask

func (*PersistentPeer) GetUpdatedAt added in v2.1.86

func (x *PersistentPeer) GetUpdatedAt() *timestamppb.Timestamp

func (*PersistentPeer) ProtoMessage added in v2.1.86

func (*PersistentPeer) ProtoMessage()

func (*PersistentPeer) ProtoReflect added in v2.1.86

func (x *PersistentPeer) ProtoReflect() protoreflect.Message

func (*PersistentPeer) Reset added in v2.1.86

func (x *PersistentPeer) Reset()

func (*PersistentPeer) String added in v2.1.86

func (x *PersistentPeer) String() string

func (*PersistentPeer) Validate added in v2.1.86

func (m *PersistentPeer) Validate() error

Validate checks the field values on PersistentPeer 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 (*PersistentPeer) ValidateAll added in v2.1.86

func (m *PersistentPeer) ValidateAll() error

ValidateAll checks the field values on PersistentPeer 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 PersistentPeerMultiError, or nil if none found.

type PersistentPeerMultiError added in v2.1.86

type PersistentPeerMultiError []error

PersistentPeerMultiError is an error wrapping multiple validation errors returned by PersistentPeer.ValidateAll() if the designated constraints aren't met.

func (PersistentPeerMultiError) AllErrors added in v2.1.86

func (m PersistentPeerMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PersistentPeerMultiError) Error added in v2.1.86

func (m PersistentPeerMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PersistentPeerValidationError added in v2.1.86

type PersistentPeerValidationError struct {
	// contains filtered or unexported fields
}

PersistentPeerValidationError is the validation error returned by PersistentPeer.Validate if the designated constraints aren't met.

func (PersistentPeerValidationError) Cause added in v2.1.86

Cause function returns cause value.

func (PersistentPeerValidationError) Error added in v2.1.86

Error satisfies the builtin error interface

func (PersistentPeerValidationError) ErrorName added in v2.1.86

func (e PersistentPeerValidationError) ErrorName() string

ErrorName returns error name.

func (PersistentPeerValidationError) Field added in v2.1.86

Field function returns field value.

func (PersistentPeerValidationError) Key added in v2.1.86

Key function returns key value.

func (PersistentPeerValidationError) Reason added in v2.1.86

Reason function returns reason value.

type PersistentTask added in v2.1.86

type PersistentTask struct {

	// Task id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Replica count of the persistent task. The persistent task will
	// not be deleted when dfdamon runs garbage collection. It only be deleted
	// when the task is deleted by the user.
	PersistentReplicaCount uint64 `` /* 130-byte string literal not displayed */
	// Current replica count of the persistent task. The persistent task
	// will not be deleted when dfdaemon runs garbage collection. It only be deleted
	// when the task is deleted by the user.
	CurrentPersistentReplicaCount uint64 `` /* 153-byte string literal not displayed */
	// Current replica count of the task. If task is not persistent,
	// the persistent task will be deleted when dfdaemon runs garbage collection.
	CurrentReplicaCount uint64 `protobuf:"varint,4,opt,name=current_replica_count,json=currentReplicaCount,proto3" json:"current_replica_count,omitempty"`
	// Task content length.
	ContentLength uint64 `protobuf:"varint,5,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
	// Task piece count.
	PieceCount uint32 `protobuf:"varint,6,opt,name=piece_count,json=pieceCount,proto3" json:"piece_count,omitempty"`
	// Task state.
	State string `protobuf:"bytes,7,opt,name=state,proto3" json:"state,omitempty"`
	// TTL of the persistent task.
	Ttl *durationpb.Duration `protobuf:"bytes,8,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// Task create time.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Task update time.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

PersistentTask metadata.

func (*PersistentTask) Descriptor deprecated added in v2.1.86

func (*PersistentTask) Descriptor() ([]byte, []int)

Deprecated: Use PersistentTask.ProtoReflect.Descriptor instead.

func (*PersistentTask) GetContentLength added in v2.1.86

func (x *PersistentTask) GetContentLength() uint64

func (*PersistentTask) GetCreatedAt added in v2.1.86

func (x *PersistentTask) GetCreatedAt() *timestamppb.Timestamp

func (*PersistentTask) GetCurrentPersistentReplicaCount added in v2.1.86

func (x *PersistentTask) GetCurrentPersistentReplicaCount() uint64

func (*PersistentTask) GetCurrentReplicaCount added in v2.1.86

func (x *PersistentTask) GetCurrentReplicaCount() uint64

func (*PersistentTask) GetId added in v2.1.86

func (x *PersistentTask) GetId() string

func (*PersistentTask) GetPersistentReplicaCount added in v2.1.86

func (x *PersistentTask) GetPersistentReplicaCount() uint64

func (*PersistentTask) GetPieceCount added in v2.1.86

func (x *PersistentTask) GetPieceCount() uint32

func (*PersistentTask) GetState added in v2.1.86

func (x *PersistentTask) GetState() string

func (*PersistentTask) GetTtl added in v2.1.86

func (x *PersistentTask) GetTtl() *durationpb.Duration

func (*PersistentTask) GetUpdatedAt added in v2.1.86

func (x *PersistentTask) GetUpdatedAt() *timestamppb.Timestamp

func (*PersistentTask) ProtoMessage added in v2.1.86

func (*PersistentTask) ProtoMessage()

func (*PersistentTask) ProtoReflect added in v2.1.86

func (x *PersistentTask) ProtoReflect() protoreflect.Message

func (*PersistentTask) Reset added in v2.1.86

func (x *PersistentTask) Reset()

func (*PersistentTask) String added in v2.1.86

func (x *PersistentTask) String() string

func (*PersistentTask) Validate added in v2.1.86

func (m *PersistentTask) Validate() error

Validate checks the field values on PersistentTask 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 (*PersistentTask) ValidateAll added in v2.1.86

func (m *PersistentTask) ValidateAll() error

ValidateAll checks the field values on PersistentTask 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 PersistentTaskMultiError, or nil if none found.

type PersistentTaskMultiError added in v2.1.86

type PersistentTaskMultiError []error

PersistentTaskMultiError is an error wrapping multiple validation errors returned by PersistentTask.ValidateAll() if the designated constraints aren't met.

func (PersistentTaskMultiError) AllErrors added in v2.1.86

func (m PersistentTaskMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PersistentTaskMultiError) Error added in v2.1.86

func (m PersistentTaskMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PersistentTaskValidationError added in v2.1.86

type PersistentTaskValidationError struct {
	// contains filtered or unexported fields
}

PersistentTaskValidationError is the validation error returned by PersistentTask.Validate if the designated constraints aren't met.

func (PersistentTaskValidationError) Cause added in v2.1.86

Cause function returns cause value.

func (PersistentTaskValidationError) Error added in v2.1.86

Error satisfies the builtin error interface

func (PersistentTaskValidationError) ErrorName added in v2.1.86

func (e PersistentTaskValidationError) ErrorName() string

ErrorName returns error name.

func (PersistentTaskValidationError) Field added in v2.1.86

Field function returns field value.

func (PersistentTaskValidationError) Key added in v2.1.86

Key function returns key value.

func (PersistentTaskValidationError) Reason added in v2.1.86

Reason function returns reason value.

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,oneof" json:"parent_id,omitempty"`
	// Piece offset.
	Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// Piece length.
	Length uint64 `protobuf:"varint,4,opt,name=length,proto3" json:"length,omitempty"`
	// Digest of the piece data, for example blake3:xxx or sha256:yyy.
	Digest string `protobuf:"bytes,5,opt,name=digest,proto3" json:"digest,omitempty"`
	// Piece content.
	Content []byte `protobuf:"bytes,6,opt,name=content,proto3,oneof" json:"content,omitempty"`
	// Traffic type.
	TrafficType *TrafficType `` /* 128-byte string literal not displayed */
	// Downloading piece costs time.
	Cost *durationpb.Duration `protobuf:"bytes,8,opt,name=cost,proto3" json:"cost,omitempty"`
	// Piece create time.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Piece represents information of piece.

func (*Piece) Descriptor deprecated

func (*Piece) Descriptor() ([]byte, []int)

Deprecated: Use Piece.ProtoReflect.Descriptor instead.

func (*Piece) GetContent

func (x *Piece) GetContent() []byte

func (*Piece) GetCost

func (x *Piece) GetCost() *durationpb.Duration

func (*Piece) GetCreatedAt

func (x *Piece) GetCreatedAt() *timestamppb.Timestamp

func (*Piece) GetDigest

func (x *Piece) GetDigest() string

func (*Piece) GetLength

func (x *Piece) GetLength() uint64

func (*Piece) GetNumber

func (x *Piece) GetNumber() uint32

func (*Piece) GetOffset

func (x *Piece) GetOffset() uint64

func (*Piece) GetParentId

func (x *Piece) GetParentId() string

func (*Piece) GetTrafficType

func (x *Piece) GetTrafficType() TrafficType

func (*Piece) ProtoMessage

func (*Piece) ProtoMessage()

func (*Piece) ProtoReflect

func (x *Piece) ProtoReflect() protoreflect.Message

func (*Piece) Reset

func (x *Piece) Reset()

func (*Piece) String

func (x *Piece) String() string

func (*Piece) Validate

func (m *Piece) Validate() error

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

func (m *Piece) ValidateAll() error

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 Priority

type Priority int32

Priority represents priority of application.

const (
	// LEVEL0 has no special meaning for scheduler.
	Priority_LEVEL0 Priority = 0
	// LEVEL1 represents the download task is forbidden,
	// and an error code is returned during the registration.
	Priority_LEVEL1 Priority = 1
	// LEVEL2 represents when the task is downloaded for the first time,
	// allow peers to download from the other peers,
	// but not back-to-source. When the task is not downloaded for
	// the first time, it is scheduled normally.
	Priority_LEVEL2 Priority = 2
	// LEVEL3 represents when the task is downloaded for the first time,
	// the normal peer is first to download back-to-source.
	// When the task is not downloaded for the first time, it is scheduled normally.
	Priority_LEVEL3 Priority = 3
	// LEVEL4 represents when the task is downloaded for the first time,
	// the super peer is first triggered to back-to-source.
	// When the task is not downloaded for the first time, it is scheduled normally.
	Priority_LEVEL4 Priority = 4
	// LEVEL5 represents when the task is downloaded for the first time,
	// the super peer is first triggered to back-to-source.
	// When the task is not downloaded for the first time, it is scheduled normally.
	Priority_LEVEL5 Priority = 5
	// LEVEL6 represents when the task is downloaded for the first time,
	// the super peer is first triggered to back-to-source.
	// When the task is not downloaded for the first time, it is scheduled normally.
	Priority_LEVEL6 Priority = 6
)

func (Priority) Descriptor

func (Priority) Descriptor() protoreflect.EnumDescriptor

func (Priority) Enum

func (x Priority) Enum() *Priority

func (Priority) EnumDescriptor deprecated

func (Priority) EnumDescriptor() ([]byte, []int)

Deprecated: Use Priority.Descriptor instead.

func (Priority) Number

func (x Priority) Number() protoreflect.EnumNumber

func (Priority) String

func (x Priority) String() string

func (Priority) Type

type Range

type Range struct {

	// Start of range.
	Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
	// Length of range.
	Length uint64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"`
	// contains filtered or unexported fields
}

Range represents download range.

func (*Range) Descriptor deprecated

func (*Range) Descriptor() ([]byte, []int)

Deprecated: Use Range.ProtoReflect.Descriptor instead.

func (*Range) GetLength

func (x *Range) GetLength() uint64

func (*Range) GetStart

func (x *Range) GetStart() uint64

func (*Range) ProtoMessage

func (*Range) ProtoMessage()

func (*Range) ProtoReflect

func (x *Range) ProtoReflect() protoreflect.Message

func (*Range) Reset

func (x *Range) Reset()

func (*Range) String

func (x *Range) String() string

func (*Range) Validate

func (m *Range) Validate() error

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

func (m *Range) ValidateAll() error

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.

const (
	// NORMAL task has pieces is more than one piece.
	SizeScope_NORMAL SizeScope = 0
	// SMALL task's content length is more than 128 byte and has only one piece.
	SizeScope_SMALL SizeScope = 1
	// TINY task's content length is less than 128 byte.
	SizeScope_TINY SizeScope = 2
	// EMPTY task's content length is equal to zero.
	SizeScope_EMPTY SizeScope = 3
	// UNKNOW task has invalid size scope.
	SizeScope_UNKNOW SizeScope = 4
)

func (SizeScope) Descriptor

func (SizeScope) Descriptor() protoreflect.EnumDescriptor

func (SizeScope) Enum

func (x SizeScope) Enum() *SizeScope

func (SizeScope) EnumDescriptor deprecated

func (SizeScope) EnumDescriptor() ([]byte, []int)

Deprecated: Use SizeScope.Descriptor instead.

func (SizeScope) Number

func (x SizeScope) Number() protoreflect.EnumNumber

func (SizeScope) String

func (x SizeScope) String() string

func (SizeScope) Type

type Task

type Task struct {

	// Task id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Task type.
	Type TaskType `protobuf:"varint,2,opt,name=type,proto3,enum=common.v2.TaskType" json:"type,omitempty"`
	// Download url.
	Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	// Verifies task data integrity after download using a digest. Supports CRC32, SHA256, and SHA512 algorithms.
	// Format: `<algorithm>:<hash>`, e.g., `crc32:xxx`, `sha256:yyy`, `sha512:zzz`.
	// Returns an error if the computed digest mismatches the expected value.
	//
	// Performance
	// Digest calculation increases processing time. Enable only when data integrity verification is critical.
	Digest *string `protobuf:"bytes,4,opt,name=digest,proto3,oneof" json:"digest,omitempty"`
	// URL tag identifies different task for same url.
	Tag *string `protobuf:"bytes,5,opt,name=tag,proto3,oneof" json:"tag,omitempty"`
	// Application of task.
	Application *string `protobuf:"bytes,6,opt,name=application,proto3,oneof" json:"application,omitempty"`
	// Filtered query params to generate the task id.
	// When filter is ["Signature", "Expires", "ns"], for example:
	// http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io
	// will generate the same task id.
	// Default value includes the filtered query params of s3, gcs, oss, obs, cos.
	FilteredQueryParams []string `protobuf:"bytes,7,rep,name=filtered_query_params,json=filteredQueryParams,proto3" json:"filtered_query_params,omitempty"`
	// Task request headers.
	RequestHeader map[string]string `` /* 188-byte string literal not displayed */
	// Task content length.
	ContentLength uint64 `protobuf:"varint,9,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
	// Task piece count.
	PieceCount uint32 `protobuf:"varint,10,opt,name=piece_count,json=pieceCount,proto3" json:"piece_count,omitempty"`
	// Task size scope.
	SizeScope SizeScope `protobuf:"varint,11,opt,name=size_scope,json=sizeScope,proto3,enum=common.v2.SizeScope" json:"size_scope,omitempty"`
	// Pieces of task.
	Pieces []*Piece `protobuf:"bytes,12,rep,name=pieces,proto3" json:"pieces,omitempty"`
	// Task state.
	State string `protobuf:"bytes,13,opt,name=state,proto3" json:"state,omitempty"`
	// Task peer count.
	PeerCount uint32 `protobuf:"varint,14,opt,name=peer_count,json=peerCount,proto3" json:"peer_count,omitempty"`
	// Task contains available peer.
	HasAvailablePeer bool `protobuf:"varint,15,opt,name=has_available_peer,json=hasAvailablePeer,proto3" json:"has_available_peer,omitempty"`
	// Task create time.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Task update time.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Task metadata.

func (*Task) Descriptor deprecated

func (*Task) Descriptor() ([]byte, []int)

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetApplication

func (x *Task) GetApplication() string

func (*Task) GetContentLength

func (x *Task) GetContentLength() uint64

func (*Task) GetCreatedAt

func (x *Task) GetCreatedAt() *timestamppb.Timestamp

func (*Task) GetDigest

func (x *Task) GetDigest() string

func (*Task) GetFilteredQueryParams added in v2.0.85

func (x *Task) GetFilteredQueryParams() []string

func (*Task) GetHasAvailablePeer

func (x *Task) GetHasAvailablePeer() bool

func (*Task) GetId

func (x *Task) GetId() string

func (*Task) GetPeerCount

func (x *Task) GetPeerCount() uint32

func (*Task) GetPieceCount

func (x *Task) GetPieceCount() uint32

func (*Task) GetPieces

func (x *Task) GetPieces() []*Piece

func (*Task) GetRequestHeader added in v2.0.84

func (x *Task) GetRequestHeader() map[string]string

func (*Task) GetSizeScope

func (x *Task) GetSizeScope() SizeScope

func (*Task) GetState

func (x *Task) GetState() string

func (*Task) GetTag

func (x *Task) GetTag() string

func (*Task) GetType

func (x *Task) GetType() TaskType

func (*Task) GetUpdatedAt

func (x *Task) GetUpdatedAt() *timestamppb.Timestamp

func (*Task) GetUrl

func (x *Task) GetUrl() string

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

func (x *Task) ProtoReflect() protoreflect.Message

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

func (*Task) Validate

func (m *Task) Validate() error

Validate checks the field values on Task 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 (*Task) ValidateAll

func (m *Task) ValidateAll() error

ValidateAll checks the field values on Task 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 TaskMultiError, or nil if none found.

type TaskMultiError

type TaskMultiError []error

TaskMultiError is an error wrapping multiple validation errors returned by Task.ValidateAll() if the designated constraints aren't met.

func (TaskMultiError) AllErrors

func (m TaskMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TaskMultiError) Error

func (m TaskMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type TaskType

type TaskType int32

TaskType represents type of task.

const (
	// STANDARD is standard type of task, it can download from source, remote peer and
	// local peer(local cache). When the standard task is never downloaded in the
	// P2P cluster, dfdaemon will download the task from the source. When the standard
	// task is downloaded in the P2P cluster, dfdaemon will download the task from
	// the remote peer or local peer(local cache), where peers use disk storage to store tasks.
	TaskType_STANDARD TaskType = 0
	// PERSISTENT is persistent type of task, it can import file and export file in P2P cluster.
	// When the persistent task is imported into the P2P cluster, dfdaemon will store
	// the task in the peer's disk and copy multiple replicas to remote peers to
	// prevent data loss.
	TaskType_PERSISTENT TaskType = 1
	// PERSISTENT_CACHE is persistent cache type of task, it can import file and export file in P2P cluster.
	// When the persistent cache task is imported into the P2P cluster, dfdaemon will store
	// the task in the peer's disk and copy multiple replicas to remote peers to prevent data loss.
	// When the expiration time is reached, task will be deleted in the P2P cluster.
	TaskType_PERSISTENT_CACHE TaskType = 2
	// CACHE is cache type of task, it can download from source, remote peer and
	// local peer(local cache). When the cache task is never downloaded in the
	// P2P cluster, dfdaemon will download the cache task from the source. When the cache
	// task is downloaded in the P2P cluster, dfdaemon will download the cache task from
	// the remote peer or local peer(local cache), where peers use memory storage to store cache tasks.
	TaskType_CACHE TaskType = 3
)

func (TaskType) Descriptor

func (TaskType) Descriptor() protoreflect.EnumDescriptor

func (TaskType) Enum

func (x TaskType) Enum() *TaskType

func (TaskType) EnumDescriptor deprecated

func (TaskType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskType.Descriptor instead.

func (TaskType) Number

func (x TaskType) Number() protoreflect.EnumNumber

func (TaskType) String

func (x TaskType) String() string

func (TaskType) Type

type TaskValidationError

type TaskValidationError struct {
	// contains filtered or unexported fields
}

TaskValidationError is the validation error returned by Task.Validate if the designated constraints aren't met.

func (TaskValidationError) Cause

func (e TaskValidationError) Cause() error

Cause function returns cause value.

func (TaskValidationError) Error

func (e TaskValidationError) Error() string

Error satisfies the builtin error interface

func (TaskValidationError) ErrorName

func (e TaskValidationError) ErrorName() string

ErrorName returns error name.

func (TaskValidationError) Field

func (e TaskValidationError) Field() string

Field function returns field value.

func (TaskValidationError) Key

func (e TaskValidationError) Key() bool

Key function returns key value.

func (TaskValidationError) Reason

func (e TaskValidationError) Reason() string

Reason function returns reason value.

type TrafficType

type TrafficType int32

TrafficType represents type of traffic.

const (
	// BACK_TO_SOURCE is to download traffic from the source.
	TrafficType_BACK_TO_SOURCE TrafficType = 0
	// REMOTE_PEER is to download traffic from the remote peer.
	TrafficType_REMOTE_PEER TrafficType = 1
	// LOCAL_PEER is to download traffic from the local peer.
	TrafficType_LOCAL_PEER TrafficType = 2
)

func (TrafficType) Descriptor

func (TrafficType) Enum

func (x TrafficType) Enum() *TrafficType

func (TrafficType) EnumDescriptor deprecated

func (TrafficType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TrafficType.Descriptor instead.

func (TrafficType) Number

func (x TrafficType) Number() protoreflect.EnumNumber

func (TrafficType) String

func (x TrafficType) String() string

func (TrafficType) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL