overflow_probes/config/config.go

29 lines
815 B
Go
Raw Normal View History

2017-09-21 08:38:05 +00:00
package config
2017-09-22 09:20:07 +00:00
const (
ConfigFileName = "config.json"
)
2017-09-29 12:30:27 +00:00
var (
ConfigDir *string
ConfigFilePath *string
CFG *Config
EncryptionKey *string
)
2017-09-21 08:38:05 +00:00
2017-09-28 10:09:33 +00:00
type Config struct {
2017-09-21 08:38:05 +00:00
Central CentralConfig `json:"central" yaml:"central" toml:"central"`
2017-09-28 10:09:33 +00:00
Probe ProbeConfig `json:"probe" yaml:"probe" toml:"probe"`
}
type CentralConfig struct {
2017-09-29 12:30:27 +00:00
URL string `required:"true" json:"url" yaml:"url" toml:"url"`
APIKey string `required:"true" json:"apiKey" yaml:"apiKey" toml:"apiKey"`
ReadBufferSize int `default:"8192" json:"readBufferSize" yaml:"readBufferSize" toml:"readBufferSize"`
WriteBufferSize int `default:"8192" json:"writeBufferSize" yaml:"writeBufferSize" toml:"writeBufferSize"`
2017-09-28 10:09:33 +00:00
}
type ProbeConfig struct {
Key *string `json:"key,omitempty" yaml:"key" toml:"key"`
2017-09-21 08:38:05 +00:00
}