net

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadQueue

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

DownloadQueue is used to limit download process

func NewQueue

func NewQueue(maxCount int) *DownloadQueue

NewQueue creates a new instance of DownloadQueue

func (*DownloadQueue) AddMultiple

func (dq *DownloadQueue) AddMultiple(url, md5sum string, limit, size int) (string, error)

AddMultiple gets the file from URL in multiple threads

func (*DownloadQueue) AddSingle

func (dq *DownloadQueue) AddSingle(url string) (string, error)

AddSingle gets a file from URL in single thread

Jump to

Keyboard shortcuts

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