aria2

package
v0.0.0-...-b629d69 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERR_RPC_CLOSED      = errors.New("rpc closed")
	ERR_CLIENT_UNLOCKED = errors.New("client unlocked")
)

Functions

This section is empty.

Types

type Aria2Cmd

type Aria2Cmd struct {
	*exec.Cmd
}

func NewCmd

func NewCmd(path string, args []string) *Aria2Cmd

func (*Aria2Cmd) Close

func (c *Aria2Cmd) Close() error

type ClientLockGuard

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

func (*ClientLockGuard) Close

func (g *ClientLockGuard) Close()

alias of `Unlock()`

func (*ClientLockGuard) Get

func (g *ClientLockGuard) Get() rpc.Client

func (*ClientLockGuard) IsUnlocked

func (g *ClientLockGuard) IsUnlocked() bool

func (*ClientLockGuard) Unlock

func (g *ClientLockGuard) Unlock()

type RpcGuard

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

func NewClient

func NewClient(opts RpcOptions) (*RpcGuard, error)

func (*RpcGuard) Close

func (r *RpcGuard) Close() error

func (*RpcGuard) GetClient

func (r *RpcGuard) GetClient() (*ClientLockGuard, error)

func (*RpcGuard) IsClosed

func (r *RpcGuard) IsClosed() bool

type RpcOptions

type RpcOptions struct {
	Host      string
	Port      uint
	Secret    string
	Transport string
	Timeout   string
	Notifier  rpc.Notifier
}

type Unlocker

type Unlocker func()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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