download

package
v6.4.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DownloadBlockReq = "/chain33/downloadBlockReq/1.0.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskInfo

type TaskInfo struct {
	ID      string        //一次下载任务的任务ID
	TaskNum int           //节点同时最大处理任务数量
	Pid     peer.ID       //节点ID
	Index   int           // 节点在任务列表中索引,方便下载失败后,把该节点从下载列表中删除
	Latency time.Duration // 任务所在节点的时延
	// contains filtered or unexported fields
}

type Tasks

type Tasks []*TaskInfo

task datastruct

func (Tasks) Len

func (t Tasks) Len() int

Len size of the Invs data

func (Tasks) Less

func (t Tasks) Less(a, b int) bool

Less Sort from low to high

func (Tasks) Remove

func (t Tasks) Remove(task *TaskInfo) Tasks

func (Tasks) Size

func (t Tasks) Size() int

func (Tasks) Sort

func (t Tasks) Sort() Tasks

func (Tasks) Swap

func (t Tasks) Swap(a, b int)

Swap the param

Jump to

Keyboard shortcuts

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