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.
Click to show internal directories.
Click to hide internal directories.