aria2

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

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 AddURI

func AddURI(ctx context.Context, uri string, dstDirPath string) error

func InitAria2Client

func InitAria2Client(uri string, secret string, timeout int) (string, error)

func InitClient

func InitClient(timeout int) (string, error)

func IsAria2Ready

func IsAria2Ready() bool

Types

type Monitor

type Monitor struct {
	// contains filtered or unexported fields
}

func (*Monitor) Complete

func (m *Monitor) Complete() error

func (*Monitor) Loop

func (m *Monitor) Loop() error

func (*Monitor) Update

func (m *Monitor) Update() (bool, error)

type Notify

type Notify struct {
	Signals generic_sync.MapOf[string, chan int]
}

func NewNotify

func NewNotify() *Notify

func (*Notify) OnBtDownloadComplete

func (n *Notify) OnBtDownloadComplete(events []rpc.Event)

func (*Notify) OnDownloadComplete

func (n *Notify) OnDownloadComplete(events []rpc.Event)

func (*Notify) OnDownloadError

func (n *Notify) OnDownloadError(events []rpc.Event)

func (*Notify) OnDownloadPause

func (n *Notify) OnDownloadPause(events []rpc.Event)

func (*Notify) OnDownloadStart

func (n *Notify) OnDownloadStart(events []rpc.Event)

func (*Notify) OnDownloadStop

func (n *Notify) OnDownloadStop(events []rpc.Event)

Jump to

Keyboard shortcuts

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