Documentation ¶
Overview ¶
Package downloader contains 2 types of downloader: P2PDownloader, DirectDownloader. P2PDownloader uses P2P pattern to download files from peers. DirectDownloader downloads files from file source directly. It's used when P2PDownloader download files failed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoDownloadTimeout ¶
func DoDownloadTimeout(downloader Downloader, timeout time.Duration) error
DoDownloadTimeout downloads the file and waits for response during the given timeout duration.
Types ¶
type Downloader ¶
type Downloader interface { Run() error Cleanup() }
Downloader is the interface to download files
Click to show internal directories.
Click to hide internal directories.