Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: GPL-3.0 Imports: 72 Imported by: 0

Documentation

Overview

Package app wires Ether's components into one running server: the Plex front end and the owner UI on one port, and the background services (catalogue sync, plex.tv registration, prefetch, LAN discovery) behind it.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnresponsive = errors.New("app: server unresponsive to local health probes")

ErrUnresponsive is returned by App.Run when the server stopped answering its own local health probe. The process then exits non-zero so the service manager restarts it.

Functions

This section is empty.

Types

type App

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

App is a running Ether server.

func New

func New(ctx context.Context, opts Options) (*App, error)

New builds every component. Nothing listens until Run.

func (*App) Close

func (a *App) Close()

Close releases every component in reverse order of construction.

func (*App) Config

func (a *App) Config() *config.Store

Config is the settings store.

func (*App) Handler

func (a *App) Handler() http.Handler

Handler is the combined Plex + owner UI handler (tests).

func (*App) Run

func (a *App) Run(ctx context.Context) error

Run serves until ctx is cancelled.

type Options

type Options struct {
	DataDir string
	Version string
	// Logger receives everything; the admin log ring is teed onto it.
	Logger *slog.Logger
	// Spike forces spike mode (local files, no Usenet) on top of config.
	Spike bool
	// SpikeFiles are extra local files for spike mode.
	SpikeFiles []string
	// DBRetryMin / DBRetryMax bound the backoff while a clustered node
	// waits at startup for an unreachable PostgreSQL server (1s / 30s).
	DBRetryMin, DBRetryMax time.Duration
}

Options configure a run.

Jump to

Keyboard shortcuts

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