config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package config loads process settings with the contrib Viper implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address string `json:"address"`

	Token    string `json:"token"`
	LogLevel string `json:"log_level"`
	LogFile  string `json:"log_file"`
}

Config contains operator-controlled settings for enabled transports.

func Load added in v1.3.0

func Load(ctx context.Context, name string, args []string, output io.Writer) (Config, error)

Load merges defaults, a file, environment and explicit flags through Viper. The default config.yaml is optional; an explicitly selected file must exist. Help returns flag.ErrHelp before reading configuration or constructing services.

func (Config) Validate

func (c Config) Validate() error

Validate checks settings before creating listeners or application resources.

Jump to

Keyboard shortcuts

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