Documentation ¶
Index ¶
- Constants
- Variables
- func AddURI(ctx context.Context, uri string, dstDirPath string) error
- func InitAria2Client(uri string, secret string, timeout int) (string, error)
- func InitClient(timeout int) (string, error)
- func IsAria2Ready() bool
- type Monitor
- type Notify
- func (n *Notify) OnBtDownloadComplete(events []rpc.Event)
- func (n *Notify) OnDownloadComplete(events []rpc.Event)
- func (n *Notify) OnDownloadError(events []rpc.Event)
- func (n *Notify) OnDownloadPause(events []rpc.Event)
- func (n *Notify) OnDownloadStart(events []rpc.Event)
- func (n *Notify) OnDownloadStop(events []rpc.Event)
Constants ¶
View Source
const ( Downloading = iota Paused Stopped Completed Errored )
Variables ¶
View Source
var DownTaskManager = task.NewTaskManager[string](3)
View Source
var TransferTaskManager = task.NewTaskManager(3, func(k *uint64) { atomic.AddUint64(k, 1) })
Functions ¶
func InitClient ¶
func IsAria2Ready ¶
func IsAria2Ready() bool
Types ¶
type Notify ¶
type Notify struct {
Signals generic_sync.MapOf[string, chan int]
}
func (*Notify) OnBtDownloadComplete ¶
func (*Notify) OnDownloadComplete ¶
func (*Notify) OnDownloadError ¶
func (*Notify) OnDownloadPause ¶
func (*Notify) OnDownloadStart ¶
func (*Notify) OnDownloadStop ¶
Click to show internal directories.
Click to hide internal directories.