app

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 ExeDir

func ExeDir() string

ExeDir returns the directory of the running executable.

func SetupLog

func SetupLog(path string, max int64) error

SetupLog sends the standard logger and everything written to os.Stderr into a size-capped log file. A GUI program has no console, so this is where its messages end up. Both go through one writer because Windows will not rename a file that is open twice.

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

func Start(stateDir, listen string) (*App, error)

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.

func (*App) Close

func (a *App) Close()

Close stops the HTTP server and the engine.

Jump to

Keyboard shortcuts

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