Versions in this module Expand all Collapse all v0 v0.0.3 Aug 22, 2022 Changes in this version + const ActionDeclare + const ActionDownload + const StatusCodeFailed + const StatusCodeOK + const StatusDeclareFailed + const StatusDeclareSuccessful + const StatusDownloadFailed + const StatusDownloadSuccessful + func Downloading() bool + type DownloadCallBackContent struct + Action string + ErrMsg string + MinerID string + SectorIDs []string + Status string + StatusCode int + type DownloadPart struct + type Downloader struct + func InitDownloader(downloadURL, targetFile, targetPath, token, minerID string, ...) *Downloader + func (d *Downloader) DownloadFile() error + type Transformer struct + CacheDir string + MaxDownloadRetry int + MaxDownloader int + SealedDir string + var ErrRetryExceed = errors.New("retry exceed") + var GlobalTransformer *Transformer + func InitTransformer(conf config.Config, ctx context.Context) *Transformer + func (t *Transformer) CallBack(content DownloadCallBackContent) error + func (t *Transformer) DeclareSector(sectorID int) error + func (t *Transformer) Downloading() bool + func (t *Transformer) Run(buf chan types.Sector) + func (t *Transformer) UnProcessing(sectorID int) v0.0.2 Aug 21, 2022