config

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2016 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(configPath string)

InitConfig creates a config object from the give configpath

func InitConfigFromString added in v0.2.1

func InitConfigFromString(configString string)

InitConfigFromString creates a config object from the give configstring primary for testing

Types

type Config

type Config struct {
	Main struct {
		NagiosSpoolfileFolder  string
		NagiosSpoolfileWorker  int
		InfluxWorker           int
		MaxInfluxWorker        int
		DumpFile               string
		NagfluxSpoolfileFolder string
		FieldSeparator         string
		BufferSize             int
	}
	ModGearman struct {
		Enabled    bool
		Address    string
		Queue      string
		Secret     string
		SecretFile string
		Worker     int
	}
	Log struct {
		LogFile     string
		MinSeverity string
	}
	Monitoring struct {
		WebserverPort string
	}
	Influx struct {
		Enabled                   bool
		Address                   string
		Arguments                 string
		Version                   string
		CreateDatabaseIfNotExists bool
		NastyString               string
		NastyStringToReplace      string
		HostcheckAlias            string
	}
	Livestatus struct {
		Type    string
		Address string
	}
	Elasticsearch struct {
		Enabled          bool
		Address          string
		Index            string
		Version          string
		HostcheckAlias   string
		NumberOfShards   int
		NumberOfReplicas int
		IndexRotation    string
	}
}

Config Represents the config file.

func GetConfig

func GetConfig() Config

GetConfig returns the static config object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL