Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfigFromFile ¶
LoadConfigFromFile fills a configuration object (passed as parameter) with values read from a configuration file (pass as parameter by filename). The configuration file needs to be in HCL format.
func LoadConfigFromFlags ¶
func LoadConfigFromFlags(config *Config, flags *StartupFlags) error
LoadConfigFromFlags fills a configuration object (passed as parameter) with values from command-line flags.
Types ¶
type Config ¶
type Config struct { Listen ListenConfig Consul ConsulConfig Namespaces []NamespaceConfig `hcl:"namespace"` }
Config models the application's configuration
type ConsulConfig ¶
type ConsulServiceConfig ¶
type ListenConfig ¶
ListenConfig is a struct describing the built-in webserver configuration
type NamespaceConfig ¶
type NamespaceConfig struct { Name string `hcl:",key"` SourceFiles []string `hcl:"source_files"` Format string `hcl:"format"` Labels map[string]string `hcl:"labels"` }
NamespaceConfig is a struct describing single metric namespaces
func (*NamespaceConfig) LabelNames ¶
func (c *NamespaceConfig) LabelNames() []string
LabelNames exports the names of all known additional labels
func (*NamespaceConfig) LabelValues ¶
func (c *NamespaceConfig) LabelValues() []string
LabelValues exports the values of all known additional labels
Click to show internal directories.
Click to hide internal directories.