config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package config loads fort-core configuration from the environment with sane defaults (backlog AO-011).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr      string // HTTP/WS bind address
	DBPath    string // SQLite state-store path
	RulesPath string // active routing ruleset
	WorkRoot  string // scoped root all native runtimes execute under

	// Multi-machine orchestration (spec 022). All optional: with MachinesPath
	// empty, Fort is single-machine and behaves exactly as before.
	NodeName     string // this machine's identity in the registry (default: hostname)
	MachinesPath string // path to machines.yaml ("" = single-machine)
	NodeToken    string // shared bearer token for inter-Fort /api/exec calls
}

Config is the fort-core runtime configuration.

func Default

func Default() Config

Default returns the built-in configuration.

func FromEnv

func FromEnv(getenv func(string) string) Config

FromEnv layers FORT_* environment overrides over the defaults. getenv is injectable for testing (pass os.Getenv in production).

Jump to

Keyboard shortcuts

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