Versions in this module Expand all Collapse all v0 v0.3.0 Mar 4, 2019 Changes in this version + type CheckServerRequest struct + DataDir string + TaskFileName string + TotalLimit int + type DownloadAPI interface + Download func(ip string, port int, req *DownloadRequest) (*http.Response, error) + func NewDownloadAPI() DownloadAPI + type DownloadRequest struct + Path string + PieceNum int + PieceRange string + PieceSize int32 + type FinishTaskRequest struct + ClientID string + Node string + TaskFileName string + TaskID string + type ParseRateRequest struct + RateLimit int + TaskFileName string + type SupernodeAPI interface + PullPieceTask func(ip string, req *types.PullPieceTaskRequest) (resp *types.PullPieceTaskResponse, e error) + Register func(ip string, req *types.RegisterRequest) (resp *types.RegisterResponse, e error) + ReportPiece func(ip string, req *types.ReportPieceRequest) (resp *types.BaseResponse, e error) + ServiceDown func(ip string, taskID string, cid string) (resp *types.BaseResponse, e error) + func NewSupernodeAPI() SupernodeAPI + type UploaderAPI interface + CheckServer func(ip string, port int, req *CheckServerRequest) (string, error) + FinishTask func(ip string, port int, req *FinishTaskRequest) error + ParseRate func(ip string, port int, req *ParseRateRequest) (string, error) + PingServer func(ip string, port int) bool + func NewUploaderAPI(timeout time.Duration) UploaderAPI