Documentation ¶
Overview ¶
Package config provides data structure for storing resourced reader/writer configurations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { GoStruct string GoStructFields map[string]interface{} Path string Interval string Host *host.Host // There are 4 kinds: reader, writer, executor, and log Kind string // Writer specific fields // ReaderPaths defines input data endpoints for a Writer. ReaderPaths []string // Executor specific fields LowThreshold int64 HighThreshold int64 Conditions string ResourcedMasterURL string ResourcedMasterAccessToken string // Logger specific fields Source string BufferSize int64 Targets []LogTargetConfig }
Config is a unit of execution for a reader/writer. Reader config defines how to fetch a particular information and its JSON data path. Writer config defines how to export the JSON data to a particular destination. E.g. Facts/graphing database.
func (*Config) CommonJsonData ¶
CommonJsonData returns common information for every reader/writer/executor JSON interpretation.
func (*Config) PathWithKindPrefix ¶
PathWithKindPrefix is common prepender function
func (*Config) PathWithPrefix ¶
PathWithPrefix prepends the short version of config.Kind to path.
type Configs ¶
Configs stores all readers, writers, and executors configuration.
func NewConfigs ¶
NewConfigs creates Configs struct given configDir.
type GeneralConfig ¶
type GeneralConfig struct { Addr string LogLevel string TTL int HTTPS struct { CertFile string KeyFile string } ResourcedMaster struct { URL string AccessToken string } MetricReceiver MetricReceiverConfig LogReceiver LogReceiverConfig }
GeneralConfig stores all other configuration data.
func NewGeneralConfig ¶
func NewGeneralConfig(configDir string) (GeneralConfig, error)
NewGeneralConfig is the constructor for GeneralConfig.