Documentation ¶
Index ¶
- Variables
- func Contains(s []string, val string) bool
- func FileExists(file string) bool
- func GetConfigDirFilePath(path string) string
- func GetConfigFilePath(name string) string
- func GetPluginDirFilePath(name string) string
- func InitConfig(file string, defaultFile embed.FS) error
- func LogDebug(v ...interface{})
- func LogDebugf(format string, a ...interface{})
- func ParseConfig() error
- func ParseConfigDir()
- func ParseFile(defaultFile embed.FS) error
- func ParseSecretsFile() (map[string]string, error)
- func ParseVersion(versionFile embed.FS)
- func UsingManager() bool
- type CheckCfg
- type Data
- type ManagerCfg
- type SenderCfg
- type Values
Constants ¶
This section is empty.
Variables ¶
View Source
var AllowedUnits = []string{"B", "kB", "MB", "GB", "TB", "PB", "KiB", "MiB", "GiB", "TiB", "PiB"}
View Source
var ConfigDefaultFile embed.FS
View Source
var ConfigDir string
View Source
var ConfigFile string
View Source
var DebugMode bool
View Source
var Log service.Logger
View Source
var PluginDir string
View Source
var Settings = new(settings)
View Source
var Version string
Functions ¶
func FileExists ¶
func GetConfigDirFilePath ¶ added in v1.1.0
func GetConfigFilePath ¶ added in v1.1.0
func GetPluginDirFilePath ¶ added in v1.1.0
func ParseConfig ¶ added in v1.1.0
func ParseConfig() error
func ParseConfigDir ¶ added in v1.1.0
func ParseConfigDir()
Run through all YAML config files in the config directory if it exists and import any configurations for checks and senders. Does not return actual error but logs issues.
func ParseSecretsFile ¶ added in v1.1.0
func ParseVersion ¶ added in v1.0.1
Set the version to the version in the VERSION file if it doesn't already exist during build time (this is mostly for DEV)
func UsingManager ¶ added in v1.1.0
func UsingManager() bool
Types ¶
type CheckCfg ¶
type Data ¶ added in v1.1.0
type Data struct { Checks []CheckCfg Senders []SenderCfg Secrets map[string]string HostAddrs map[string]string sync.RWMutex }
var CfgData Data
Actual config data (checks, senders, secrets) after parse
type ManagerCfg ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.