download_mgr

package
v0.0.0-...-12b7791 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const NODE_DOWNLOAD_CODE_ERR = -10001 //general download failure

todo put these consts into common as will be used for both server and peer

View Source
const NODE_DOWNLOAD_CODE_ERR_BUSY = -10002 //active shutdown cause of max_downloaders limited , system too busy
View Source
const NODE_DOWNLOAD_CODE_ERR_DISK_SPACE = -10006 //active shutdown cause of single file size limit
View Source
const NODE_DOWNLOAD_CODE_ERR_OTHER_DOWNLOADING = -10004 //active shutdown cause of someone else is downloading it
View Source
const NODE_DOWNLOAD_CODE_ERR_OVERSIZE = -10005 //active shutdown cause of single file size limit
View Source
const NODE_DOWNLOAD_CODE_ERR_SLOW = -10003 //active shutdown cause of too slow download at high traffic time

Variables

This section is empty.

Functions

func GetTotalDownloaderNum

func GetTotalDownloaderNum() int64

func PreCheckTask

func PreCheckTask(remoteUrl string) error

func StartDownloader

func StartDownloader(
	remoteUrl string,
	file_hash string,
	callback_succeed func(filehash string, file_size int64),
	callback_failed func(filehash string, download_code int),
)

Types

This section is empty.

Jump to

Keyboard shortcuts

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