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

config

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProcessorAPI    = "api"
	ProcessorScript = "script"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Logger struct {
		Console struct {
			PrintFile   bool `yaml:"print_file"`
			EnableColor bool `yaml:"enable_color"`
			LogLevel    int  `yaml:"log_level"`
			Enabled     bool `yaml:"enabled"`
		} `yaml:"console"`
	} `yaml:"logger"`
	Prometheus struct {
		Enabled  bool   `yaml:"enabled"`
		Port     int    `yaml:"port"`
		Path     string `yaml:"path"`
		Detailed bool   `yaml:"detailed"`
	} `yaml:"prometheus"`
	Radius radius.Config `yaml:"radius"`

	// Processor selects the backend: "api" (default) or "script".
	Processor string        `yaml:"processor"`
	Api       api.Config    `yaml:"api"`
	Script    script.Config `yaml:"script"`

	Profiler struct {
		Port    int  `yaml:"port"`
		Enabled bool `yaml:"enabled"`
	} `yaml:"profiler"`
}

func Load added in v0.3.13

func Load(path string) (Configuration, error)

Load reads the YAML config after substituting environment variables. Like in shell, the default is used when VAR is unset or empty; ${VAR} without a default is required, so the server never starts with a silently empty secret.

Jump to

Keyboard shortcuts

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