notifier

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotifyEvents = &ne{
	Start:      "aria2.onDownloadStart",
	Pause:      "aria2.onDownloadPause",
	Stop:       "aria2.onDownloadStop",
	Complete:   "aria2.onDownloadComplete",
	Error:      "aria2.onDownloadError",
	BtComplete: "aria2.onBtDownloadComplete",
}

Functions

func NewNotifier

func NewNotifier(host *url.URL) *notifier

Types

type Event

type Event struct {
	Gid string `json:"gid"`
}

type Notify

type Notify struct {
	Close func()
	// contains filtered or unexported fields
}

func (*Notify) BtComplete

func (n *Notify) BtComplete() <-chan string

func (*Notify) Complete

func (n *Notify) Complete() <-chan string

func (*Notify) Error

func (n *Notify) Error() <-chan string

func (*Notify) ListenMultiple

func (n *Notify) ListenMultiple(events map[string]func(gid string))

func (*Notify) ListenOnce

func (n *Notify) ListenOnce(method string, fn func(gid string, stop func()))

func (*Notify) Pause

func (n *Notify) Pause() <-chan string

func (*Notify) Start

func (n *Notify) Start() <-chan string

func (*Notify) Stop

func (n *Notify) Stop() <-chan string

type Tasks

type Tasks = map[string]func(gid string)

Jump to

Keyboard shortcuts

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