startup

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package startup provides invariant checks that run before core fully boots. These catch misconfigurations early — missing directories, wrong permissions, version mismatches — so they surface as clear log messages rather than cryptic runtime errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FatalErrors

func FatalErrors(results []Result) []error

FatalErrors returns all fatal errors from a RunAll slice.

func HasFatal

func HasFatal(results []Result) bool

HasFatal reports whether any result in a RunAll slice is fatal.

Types

type Result

type Result struct {
	Name    string
	Warning string // non-fatal — logged and returned
	Fatal   error  // fatal — caller should abort startup
}

Result holds the outcome of a single startup check.

func RunAll

func RunAll(cfg *config.Config) []Result

RunAll executes all startup invariant checks against the given config. Returns all results. Warnings are non-fatal. Fatal errors must be handled by the caller (typically: log and os.Exit(1) from main).

RunAll never calls os.Exit itself — that responsibility belongs to the caller.

Jump to

Keyboard shortcuts

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