tasker

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(f *bdpan.FileInfo, path string) error

DownloadFile 下载文件到本地路径。 若构建任务或准备目录失败,返回 error 而非 panic。

Types

type DownloadTaskInfo

type DownloadTaskInfo struct {
	// From string
	FSID uint64
	To   string
}

type DownloadTasker

type DownloadTasker struct {
	*godler.Tasker
	// 迁移的地址
	File  *bdpan.FileInfo
	To    string
	Token string
}

func NewDownloadTasker

func NewDownloadTasker(f *bdpan.FileInfo, path string) *DownloadTasker

func (*DownloadTasker) AfterRun

func (m *DownloadTasker) AfterRun() error

func (*DownloadTasker) BeforeRun

func (m *DownloadTasker) BeforeRun() error

BeforeRun 准备下载目录。 若创建目录失败,返回 error 而非 panic。

func (*DownloadTasker) BuildTasks

func (m *DownloadTasker) BuildTasks() error

BuildTasks 构建下载任务列表。 若获取文件列表失败,返回 error 而非 panic。

func (DownloadTasker) RunTask

func (m DownloadTasker) RunTask(task *godler.Task) error

Jump to

Keyboard shortcuts

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