diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-09-24 13:04:16 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-09-24 13:04:16 (GMT) |
commit | 1e775fc17c784d46ef1286db351ecfda5d212201 (patch) | |
tree | dca73f73c645cc09ac7e0bf797420867ddf6a151 /src/rhctl/conf.go | |
parent | 301ad925c1e202f4264ae5d45e21e4f0a837458c (diff) |
make settling times configurable
Diffstat (limited to 'src/rhctl/conf.go')
-rw-r--r-- | src/rhctl/conf.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/rhctl/conf.go b/src/rhctl/conf.go index 8df11f0..3e35abb 100644 --- a/src/rhctl/conf.go +++ b/src/rhctl/conf.go @@ -73,6 +73,19 @@ type Config struct { HeartbeatThreshold uint `toml:"heartbeat_threshold"` } + Timing struct { + Settling struct { + Awakening Duration `toml:"awakening"` + SelectServer Duration `toml:"select_server"` + UpdateStates Duration `toml:"update_states"` + } + + StaleStates struct { + CheckInterval Duration `toml:"check_interval"` + MaxAge Duration `toml:"max_age"` + } + } + Clients struct { Web struct { Address string `toml:"addr"` @@ -90,6 +103,9 @@ type Duration struct { func (d *Duration) UnmarshalTOML(data []byte) (err error) { ds := strings.Trim(string(data), "\"") d.Duration, err = time.ParseDuration(ds) + if err == nil && d.Duration < 0 { + err = errors.New("negative durations are not allowed") + } return } |