Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct { FileSize int Link string FilePath string TotalPart int //下载线程 DoneFilePart []Part PartSize int }
FileDownloader 文件下载器
func NewFileDownloader ¶
func NewFileDownloader(downloadLink, filePath string) *Downloader
NewFileDownloader .
func (*Downloader) SetPartSize ¶
func (d *Downloader) SetPartSize(PartSize int)
func (*Downloader) SetTotalPart ¶
func (d *Downloader) SetTotalPart(totalPart int)
type Part ¶
type Part struct { Index int //文件分片的序号 From int //开始byte To int //解决byte Data []byte //http下载得到的文件内容 FilePath string //下载到本地的分片文件路径 }
filePart 文件分片
Click to show internal directories.
Click to hide internal directories.