Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CommModePull Defines the string representing pull communication for check. CommModePull = "pull" // CommModePush Defines the string representing push communication for check. CommModePush = "push" )
Variables ¶
This section is empty.
Functions ¶
func OverrideConfigFromEnvVars ¶
OverrideConfigFromEnvVars overrides config object with values setted in env vars.
func OverrideConfigFromOptions ¶
func OverrideConfigFromOptions(c *Config)
OverrideConfigFromOptions overrides config object with values setted in env vars.
Types ¶
type CheckConfig ¶
type CheckConfig struct { Target string `toml:"Target"` AssetType string `toml:"AssetType"` Opts string `toml:"Options"` CheckID string `toml:"CheckID"` CheckTypeName string `toml:"CheckTypeName"` CheckTypeVersion string `toml:"CheckTypeVersion"` }
CheckConfig stores config information needed by a check.
type Config ¶
type Config struct { Check CheckConfig `toml:"Check"` Log LogConfig `toml:"Log"` CommMode string `toml:"CommMode"` Push rest.PusherConfig `toml:"Push"` Port *int `toml:"Port"` ShutdownTimeout *int `toml:"ShutdownTimeout"` AllowPrivateIPs *bool `toml:"AllowPrivateIps"` RequiredVars map[string]string `toml:"RequiredVars"` VcsRevision string `toml:"VcsRevision"` }
Config holds all values regarding configuration.
func BuildConfig ¶
BuildConfig builds a configuration struct by reading, if exists, the conf file and overriding the conf values from env vars.
func LoadConfigFromFile ¶
LoadConfigFromFile loads configuration file from a path.
Click to show internal directories.
Click to hide internal directories.