Documentation ¶
Overview ¶
This pkg is used by the `9volt cfg` portion of the tool
Index ¶
Constants ¶
View Source
const ( MONITOR_TYPE = "monitor" ALERTER_TYPE = "alerter" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CfgUtil ¶
type CfgUtil struct {
Dir string
}
func (*CfgUtil) Fetch ¶
Recursively walk through 'dir', find any .yaml files and verify that they are in fact files containing valid YAML. If they do not contain valid YAML, skip file and display warning.
func (*CfgUtil) Parse ¶
func (c *CfgUtil) Parse(files []string) (*dal.FullConfigs, error)
Roll through the list of YAML files, parsing each for all 'alerter' and 'monitor' sections; parse (and validate) each section, convert it from YAML -> JSON and construct a response with MonitorConfigs and AlerterConfigs.
Structure for MonitorConfigs and AlerterConfigs is a map where the key is the keyname for the config and the vaue is the JSON blob as a byte slice.
type YAMLFileBlob ¶
Click to show internal directories.
Click to hide internal directories.