Version: v0.0.0-...-6f49429 Latest Latest

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

Go to latest
Published: Dec 23, 2021 License: AGPL-3.0 Imports: 42 Imported by: 1




This section is empty.


View Source
var (

	//ErrDiskSpace raised if disk space not enough
	ErrDiskSpace = errors.New("not enough disk space")


This section is empty.


type Server

type Server struct {
	Title          string `opts:"help=Title of this instance,env=TITLE"`
	Port           int    `opts:"help=Depreciated. use --listen. Listening port(),env=PORT"`
	Host           string `opts:"help=Depreciated. use --listen. Listening interface,env=HOST"`
	Listen         string `opts:"help=Listening Address:Port or unix socket (default all),env=LISTEN"`
	UnixPerm       string `opts:"help=DomainSocket file permission (default 0666),env=UNIXPERM"`
	Auth           string `opts:"help=Optional basic auth in form 'user:password',env=AUTH"`
	ProxyURL       string `opts:"help=Proxy url,env=PROXY_URL"`
	ConfigPath     string `opts:"help=Configuration file path (default ./cloud-torrent.yaml),short=c,env=CONFIGPATH"`
	KeyPath        string `opts:"help=TLS Key file path"`
	CertPath       string `opts:"help=TLS Certicate file path,short=r"`
	RestAPI        string `opts:"help=Listen on a trusted port accepts /api/ requests (eg. localhost:3001),env=RESTAPI"`
	ReqLog         bool   `opts:"help=Enable request logging,env=REQLOG"`
	Open           bool   `opts:"help=Open now with your default browser"`
	DisableLogTime bool   `opts:"help=Don't print timestamp in log,env=DISABLELOGTIME"`
	DisableMmap    bool   `opts:"help=Don't use mmap,env=DISABLEMMAP"`
	Debug          bool   `opts:"help=Debug app,env=DEBUG"`
	DebugTorrent   bool   `opts:"help=Debug torrent engine,env=DEBUGTORRENT"`
	ConvYAML       bool   `opts:"help=Convert old json config to yaml format."`
	IntevalSec     int    `opts:"help=Inteval seconds to push data to clients (default 3),env=INTEVALSEC"`
	// contains filtered or unexported fields

Server is the "State" portion of the diagram

func (*Server) GetBoolAttribute

func (s *Server) GetBoolAttribute(name string) bool

func (*Server) GetStrAttribute

func (s *Server) GetStrAttribute(name string) string

func (*Server) Run

func (s *Server) Run(tpl *TPLInfo) error

Run the server

type TPLInfo

type TPLInfo struct {
	Uptime                int64
	Title                 string
	Version               string
	Runtime               string
	AllowRuntimeConfigure bool

func (TPLInfo) GetInfo

func (t TPLInfo) GetInfo() string

func (TPLInfo) GetTemplate

func (TPLInfo) GetTemplate(n string) (template.HTML, error)


Path Synopsis

Jump to

Keyboard shortcuts

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