bootstrap

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package bootstrap starts the atvloadly service: the initialization sequence of the server command, without the command line. The server command and the desktop app both run it, and the desktop app serves the web app on the listener it returns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(opts Options) (addr string, stop func(), err error)

Run initializes the service and serves the web app. It returns after the listener is bound (the service keeps running in the background); stop shuts the listener down and returns once the web app has stopped.

Types

type Options

type Options struct {
	// ConfigFile is the yaml file to load; empty means the default location.
	ConfigFile string
	// Debug turns on debug logging and sql logging.
	Debug bool
	// Trace turns on trace logging and sql logging; implies Debug.
	Trace bool
	// Port overrides conf.Server.Port; zero keeps the configured port.
	// Port -1 binds a random free port instead.
	Port int
	// ListenAddr overrides conf.Server.ListenAddr.
	ListenAddr string
	// Zeroconf overrides conf.Zeroconf (mDNS device discovery) when set; nil
	// keeps the value from the config file or ZEROCONF_ENABLED.
	Zeroconf *bool
	// DataDir overrides conf.Server.DataDir, the directory holding the
	// database, settings, keys and logs; empty keeps the configured dir.
	DataDir string
}

Options configures a service run. Zero fields fall back to the same defaults the server command uses.

Jump to

Keyboard shortcuts

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