Documentation ¶
Index ¶
- Constants
- Variables
- type BtEngine
- func (e *BtEngine) DeleteTorrent(id string) error
- func (e *BtEngine) GetAllStatus() ([]Status, error)
- func (e *BtEngine) GetDownloadRateLimit() (int, error)
- func (e *BtEngine) GetFilePath(id string) string
- func (e *BtEngine) GetStatus(id string) (*Status, error)
- func (e *BtEngine) GetTorrent(id string) ([]byte, error)
- func (e *BtEngine) GetTorrentFilePath(id string) string
- func (e *BtEngine) GetTorrents() map[string]*Torrent
- func (e *BtEngine) GetUploadRateLimit() (int, error)
- func (e *BtEngine) RootDir() string
- func (e *BtEngine) Run() error
- func (e *BtEngine) SetDownloadRateLimit(download int) error
- func (e *BtEngine) SetUploadRateLimit(upload int) error
- func (e *BtEngine) StartLeecher(id string, torrentData []byte, p *ProgressDownload) error
- func (e *BtEngine) StartSeed(id string) error
- func (e *BtEngine) Started() bool
- func (e *BtEngine) StopTorrent(id string) error
- type Config
- type ProgressDownload
- type State
- type Status
- type Torrent
Constants ¶
View Source
const DefaultDownloadRateLimit = 50 * 1024 * 1024
View Source
const DefaultUploadRateLimit = 50 * 1024 * 1024 // 50Mb/s
Variables ¶
View Source
var ( ErrBtEngineNotStart = fmt.Errorf("BT engine not started") ErrIdNotExist = fmt.Errorf("ID not exist") )
Functions ¶
This section is empty.
Types ¶
type BtEngine ¶
type BtEngine struct {
// contains filtered or unexported fields
}
BtEngine backed by anacrolix/torrent
func (*BtEngine) DeleteTorrent ¶
func (*BtEngine) GetAllStatus ¶
func (*BtEngine) GetDownloadRateLimit ¶
func (*BtEngine) GetFilePath ¶
func (*BtEngine) GetTorrentFilePath ¶
func (*BtEngine) GetTorrents ¶
GetTorrents moves torrents out of the anacrolix/torrent and into the local cache
func (*BtEngine) GetUploadRateLimit ¶
func (*BtEngine) SetDownloadRateLimit ¶
func (*BtEngine) SetUploadRateLimit ¶
func (*BtEngine) StartLeecher ¶
func (e *BtEngine) StartLeecher(id string, torrentData []byte, p *ProgressDownload) error
func (*BtEngine) StopTorrent ¶
type ProgressDownload ¶
type ProgressDownload struct {
// contains filtered or unexported fields
}
func NewProgressDownload ¶
func NewProgressDownload(id string, size int, output io.Writer) *ProgressDownload
Click to show internal directories.
Click to hide internal directories.