app

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(opts Options) error

Run creates, initializes, and runs the application, handling graceful shutdown.

Types

type App

type App struct {
	Config     *config.Config
	SQLite     *sqlite.DB
	ClickHouse *clickhouse.Manager
	Logger     *slog.Logger

	WebFS     http.FileSystem
	BuildInfo string
	Version   string
	Alerts    *alerts.Manager
	// contains filtered or unexported fields
}

App represents the core application context, holding dependencies and configuration.

func New

func New(opts Options) (*App, error)

New creates and configures a new App instance.

func (*App) Initialize

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

Initialize sets up application components like database connections, the OIDC provider, and the HTTP server.

func (*App) Shutdown

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

Shutdown gracefully stops all application components with timeouts.

func (*App) Start

func (a *App) Start() error

Start begins the application's main execution loop (starts the HTTP server).

type Options

type Options struct {
	ConfigPath string
	WebFS      http.FileSystem // Web filesystem for serving static files.
	BuildInfo  string
	Version    string
}

Options contains configuration needed when creating a new App instance.

Jump to

Keyboard shortcuts

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