Documentation ¶
Overview ¶
Package config provides the definition of Config and a method to parse it from a []byte
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CfgViper *viper.Viper
CfgViper is the instance of config
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Interval between pollings in manager Interval int // LogLevel: 0-5 is acceptable LogLevel log.Level // ConcurrentLimit: how many worker can run at the same time ConcurrentLimit int `mapstructure:"concurrent_limit"` // LogStashConfig represents configurations for logstash LogStashConfig LogStashConfig `mapstructure:"logstash"` // ExporterAddr is the address to expose metrics, :8080 for default ExporterAddr string `mapstructure:"exporter_address"` // JsonAPIConfig specifies configuration of JSON restful API JsonAPIConfig JsonAPIConfig `mapstructure:"json_api"` // Worker sync checkpoint path Checkpoint string `mapstructure:"checkpoint"` // Config for each repo is represented as an array of RepoConfig. Nested structure is disallowed Repos []RepoConfig // A dummy section that will not be used in our program. Dummy interface{} `mapstructure:"dummy"` }
Config stores all configuration of lug
type JsonAPIConfig ¶
type JsonAPIConfig struct { // The address that lug listens for JSON API Address string }
type LogStashConfig ¶
type RepoConfig ¶
type RepoConfig map[string]interface{}
RepoConfig stores config of each repo in a map
Click to show internal directories.
Click to hide internal directories.