configuration

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	StartDelay int `mapstructure:"start_delay"`

	Log struct {
		Level  string `mapstructure:"level"`
		Format string `mapstructure:"format"`
	} `mapstructure:"log"`

	ProxySQL struct {
		Address  string `mapstructure:"address"`
		Username string `mapstructure:"username"`
		Password string `mapstructure:"password"`
	} `mapstructure:"proxysql"`

	RunMode string `mapstructure:"run_mode"`

	Core struct {
		Interval    int `mapstructure:"interval"`
		PodSelector struct {
			Namespace string `mapstructure:"namespace"`
			App       string `mapstructure:"app"`
			Component string `mapstructure:"component"`
		} `mapstructure:"podselector"`
	} `mapstructure:"core"`

	Satellite struct {
		Interval int `mapstructure:"interval"`
	} `mapstructure:"satellite"`

	Interfaces []string `mapstructure:"interfaces"`
}

func Configure

func Configure() (*Config, error)

Parse the various configuration methods. Levels of precedence, from least to most:

  1. defaults set in this function
  2. config file
  3. ENV variables
  4. commandline flags

Jump to

Keyboard shortcuts

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