config

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetFlags

func SetFlags() (err error)

Set flags and default variables.

Types

type Config

type Config struct {
	ListenAddress  string `mapstructure:"listen-address"`
	TelemetryPath  string `mapstructure:"telemetry-path"`
	ScrapeURI      string `mapstructure:"scrape-uri"`
	SkipVerify     bool   `mapstructure:"skip-verify"`
	Timeout        int    `mapstructure:"timeout"`
	WallixUsername string `mapstructure:"wallix-username"`
	WallixPassword string `mapstructure:"wallix-password"`
}

All configuration available for the user.

func LoadConfig

func LoadConfig(path string) (config Config, err error)

Entry point function to load the configuration with the following precedence order: - flag - env var - config file The config file is optional.

Jump to

Keyboard shortcuts

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