package
0.1.3
Repository: https://github.com/dreamniu/dragonfly-api.git
Documentation: pkg.go.dev

# Constants

LEVEL0 has no special meaning for scheduler.
LEVEL1 represents the download task is forbidden, and an error code is returned during the registration.
LEVEL2 represents when the task is downloaded for the first time, allow peers to download from the other peers, but not back-to-source.
LEVEL3 represents when the task is downloaded for the first time, the normal peer is first to download back-to-source.
LEVEL4 represents when the task is downloaded for the first time, the weak peer is first triggered to back-to-source.
LEVEL5 represents when the task is downloaded for the first time, the strong peer is first triggered to back-to-source.
LEVEL6 represents when the task is downloaded for the first time, the super peer is first triggered to back-to-source.
EMPTY task's content length is equal to zero.
NORMAL task has pieces is more than one piece.
SMALL task's content length is more than 128 byte and has only one piece.
TINY task's content length is less than 128 byte.
UNKNOW task has invalid size scope.
DFCACHE is dfcache type of task, dfcache task is a cache task, and the task url is fake url.
DFDAEMON is dfdeamon type of task, dfdeamon task is a normal p2p task.
DFSTORE is dfstore type of task, dfstore task is a persistent task in backend.
BACK_TO_SOURCE is to download traffic from the source.
LOCAL_PEER is to download traffic from the local peer.
REMOTE_PEER is to download traffic from the remote peer.

# Variables

No description provided by the author
Enum value maps for Priority.
Enum value maps for Priority.
Enum value maps for SizeScope.
Enum value maps for SizeScope.
Enum value maps for TaskType.
Enum value maps for TaskType.
Enum value maps for TrafficType.
Enum value maps for TrafficType.

# Structs

Build information.
BuildValidationError is the validation error returned by Build.Validate if the designated constraints aren't met.
CPU Stat.
CPUTimes contains the amounts of time the CPU has spent performing different kinds of work.
CPUTimesValidationError is the validation error returned by CPUTimes.Validate if the designated constraints aren't met.
CPUValidationError is the validation error returned by CPU.Validate if the designated constraints aren't met.
Disk Stat.
DiskValidationError is the validation error returned by Disk.Validate if the designated constraints aren't met.
Download information.
DownloadValidationError is the validation error returned by Download.Validate if the designated constraints aren't met.
Host metadata.
HostValidationError is the validation error returned by Host.Validate if the designated constraints aren't met.
Memory Stat.
MemoryValidationError is the validation error returned by Memory.Validate if the designated constraints aren't met.
Network Stat.
NetworkValidationError is the validation error returned by Network.Validate if the designated constraints aren't met.
Peer metadata.
PeerValidationError is the validation error returned by Peer.Validate if the designated constraints aren't met.
Piece represents information of piece.
PieceValidationError is the validation error returned by Piece.Validate if the designated constraints aren't met.
Range represents download range.
RangeValidationError is the validation error returned by Range.Validate if the designated constraints aren't met.
Task metadata.
TaskValidationError is the validation error returned by Task.Validate if the designated constraints aren't met.

# Type aliases

BuildMultiError is an error wrapping multiple validation errors returned by Build.ValidateAll() if the designated constraints aren't met.
CPUMultiError is an error wrapping multiple validation errors returned by CPU.ValidateAll() if the designated constraints aren't met.
CPUTimesMultiError is an error wrapping multiple validation errors returned by CPUTimes.ValidateAll() if the designated constraints aren't met.
DiskMultiError is an error wrapping multiple validation errors returned by Disk.ValidateAll() if the designated constraints aren't met.
DownloadMultiError is an error wrapping multiple validation errors returned by Download.ValidateAll() if the designated constraints aren't met.
HostMultiError is an error wrapping multiple validation errors returned by Host.ValidateAll() if the designated constraints aren't met.
MemoryMultiError is an error wrapping multiple validation errors returned by Memory.ValidateAll() if the designated constraints aren't met.
NetworkMultiError is an error wrapping multiple validation errors returned by Network.ValidateAll() if the designated constraints aren't met.
PeerMultiError is an error wrapping multiple validation errors returned by Peer.ValidateAll() if the designated constraints aren't met.
PieceMultiError is an error wrapping multiple validation errors returned by Piece.ValidateAll() if the designated constraints aren't met.
Priority represents priority of application.
RangeMultiError is an error wrapping multiple validation errors returned by Range.ValidateAll() if the designated constraints aren't met.
SizeScope represents size scope of task.
TaskMultiError is an error wrapping multiple validation errors returned by Task.ValidateAll() if the designated constraints aren't met.
TaskType represents type of task.
TrafficType represents type of traffic.