Documentation
¶
Overview ¶
Package app starts the whole daemon (engine + HTTP API + web UI). It is shared by the console daemon and the Windows desktop application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultStateDir ¶ added in v1.0.4
func DefaultStateDir() string
DefaultStateDir returns where Equinox keeps its settings, torrents and downloads by default: the "data" folder next to the executable, so a per-user or portable install carries its data with it. When that folder cannot be created — a machine-wide install to Program Files, where a standard user has no write access there — a per-user folder is used instead, so the app still starts rather than failing with "access is denied".
Types ¶
type App ¶
type App struct {
Manager *core.Manager
Settings *config.Store
// URL opens the web UI with the access key already included.
URL string
// Token is the API access key.
Token string
// StateDir is where settings, state, torrent copies and downloads live.
StateDir string
// contains filtered or unexported fields
}
App is a running daemon.
func Start ¶
Start brings everything up. listen is the preferred HTTP address; if it is taken, a free loopback port is used instead. Only loopback addresses are accepted.
type Options ¶ added in v1.0.24
type Options struct {
// Open is for a server behind a proxy that signs users in (Umbrel): it may listen on any address, and it asks
// for no personal key (see api.Server.SetOpen). Without it only loopback addresses are accepted.
Open bool
// AllowedHosts are host names accepted in open mode besides the usual ones.
AllowedHosts []string
// Downloads is where a first start saves torrents, instead of the user's Downloads folder.
Downloads string
}
Options are the ways a server differs from the desktop application.