Documentation ¶
Index ¶
Constants ¶
View Source
const ( // KeyDebug enables debug messages. KeyDebug = "debug" // KeyLogLevel logging level (panic, fatal, error, warn, info, debug, disabled). KeyLogLevel = "log.level" // KeyLogPretty output formatted log lines (for running in foreground). KeyLogPretty = "log.pretty" // KeyShowConfig - show configuration and exit. KeyShowConfig = "show-config" // KeyShowVersion - show version information and exit. KeyShowVersion = "version" )
NOTE: adding a Key* MUST be reflected in the Config structures above.
Variables ¶
View Source
var ( // MetricNameSeparator defines character used to delimit metric name parts. MetricNameSeparator = defaults.MetricNameSeparator // var, TBD whether it will become configurable )
Functions ¶
func LoadConfigFile ¶
LoadConfigFile will attempt to load json|toml|yaml configuration files. `base` is the full path and base name of the configuration file to load. `target` is an interface in to which the data will be loaded. Checks for '<base>.json', '<base>.toml', and '<base>.yaml'.
func VerifyFile ¶
VerifyFile ensures a file exists and is readable. It returns the normalized name and an error, if encountered.
Types ¶
type AWSConfig ¶
type AWSConfig struct { ConfDir string `json:"conf_dir" toml:"conf_dir" yaml:"conf_dir"` Enabled bool `json:"enabled" toml:"enabled" yaml:"enabled"` }
AWSConfig defines the AWS cloud service configuration.
type AzureConfig ¶
type AzureConfig struct { ConfDir string `json:"conf_dir" toml:"conf_dir" yaml:"conf_dir"` Enabled bool `json:"enabled" toml:"enabled" yaml:"enabled"` }
AzureConfig defines the Azure cloud service configuration.
type Config ¶
type Config struct { AWS *AWSConfig `json:"aws" toml:"aws" yaml:"aws"` Azure *AzureConfig `json:"azure" toml:"azure" yaml:"azure"` GCP *GCPConfig `json:"gcp" toml:"gcp" yaml:"gcp"` Log Log `json:"log" yaml:"log" toml:"log"` Debug bool `json:"debug" yaml:"debug" toml:"debug"` PipeSubmits bool `json:"pipe_submits" toml:"pipe_submits" yaml:"pipe_submits"` }
Config defines the running config structure.
Click to show internal directories.
Click to hide internal directories.