engine

package
v0.0.0-...-add6754 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AutoStart         bool
	DisableEncryption bool
	DownloadDirectory string
	EnableUpload      bool
	EnableSeeding     bool
	IncomingPort      int
}

type Engine

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

the Engine Cloud Torrent engine, backed by anacrolix/torrent

func New

func New() *Engine

func (*Engine) Configure

func (e *Engine) Configure(c Config) error

func (*Engine) DeleteTorrent

func (e *Engine) DeleteTorrent(infohash string) error

func (*Engine) GetTorrents

func (e *Engine) GetTorrents() map[string]*Torrent

GetTorrents moves torrents out of the anacrolix/torrent and into the local cache

func (*Engine) NewTorrent

func (e *Engine) NewTorrent(magnetURI string) error

func (*Engine) StartFile

func (e *Engine) StartFile(infohash, filepath string) error

func (*Engine) StartTorrent

func (e *Engine) StartTorrent(infohash string) error

func (*Engine) StopFile

func (e *Engine) StopFile(infohash, filepath string) error

func (*Engine) StopTorrent

func (e *Engine) StopTorrent(infohash string) error

type File

type File struct {
	//anacrolix/torrent
	Path      string
	Size      int64
	Chunks    int
	Completed int
	//cloud torrent
	Started bool
	Percent float32
	// contains filtered or unexported fields
}

type Torrent

type Torrent struct {
	//anacrolix/torrent
	InfoHash   string
	Name       string
	Loaded     bool
	Downloaded int64
	Size       int64
	Files      []*File
	//cloud torrent
	Started      bool
	Dropped      bool
	Percent      float32
	DownloadRate float32
	// contains filtered or unexported fields
}

func (*Torrent) Update

func (torrent *Torrent) Update(t torrent.Torrent)

Jump to

Keyboard shortcuts

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