torrentd

package module
v0.0.0-...-b9906d2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

package torrentd provides a lightweight, headless torrent client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	Bind         string `toml:"bind"`
	EnableUpnp   bool   `toml:"enable_upnp_forwarding"`
	DownloadPath string `toml:"download_path"`
	StatePath    string `toml:"state_path"`
	TorrentPath  string `toml:"torrent_path"` // TODO
}

type Config

type Config struct {
	Client ClientConfig `toml:"client"`
	Web    WebConfig    `toml:"web"`
	Debug  DebugConfig
}

func DefaultConfig

func DefaultConfig() *Config

type DebugConfig

type DebugConfig struct {
	BindPProf             string `toml:"bind_pprof"`
	AnacrolixDebugLogging bool   `toml:"enable_anacrolix_debug_logging"`
}

type Torrentd

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

func NewFromConfig

func NewFromConfig(conf *Config) (*Torrentd, error)

NewFromConfig constructs a torrentd instance based on the config.

func (*Torrentd) Start

func (td *Torrentd) Start(ctx context.Context) error

Start starts the web UI and torrent client. It blocks until ctx is canceled.

type WebConfig

type WebConfig struct {
	Bind        string `toml:"bind"`
	TLSCertFile string `toml:"tls_cert"`
	TLSKeyFile  string `toml:"tls_key"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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