Fix ProvidersThrottleDuration doc
This commit is contained in:
parent
649cb548d0
commit
adcf58da68
3 changed files with 8 additions and 8 deletions
|
@ -31,14 +31,14 @@
|
||||||
#
|
#
|
||||||
# logLevel = "ERROR"
|
# logLevel = "ERROR"
|
||||||
|
|
||||||
# Backends throttle duration: minimum duration between 2 events from providers
|
# Backends throttle duration: minimum duration in seconds between 2 events from providers
|
||||||
# before applying a new configuration. It avoids unnecessary reloads if multiples events
|
# before applying a new configuration. It avoids unnecessary reloads if multiples events
|
||||||
# are sent in a short amount of time.
|
# are sent in a short amount of time.
|
||||||
#
|
#
|
||||||
# Optional
|
# Optional
|
||||||
# Default: "2s"
|
# Default: "2"
|
||||||
#
|
#
|
||||||
# ProvidersThrottleDuration = "5s"
|
# ProvidersThrottleDuration = "5"
|
||||||
|
|
||||||
# If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used.
|
# If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used.
|
||||||
# If you encounter 'too many open files' errors, you can either change this value, or change `ulimit` value.
|
# If you encounter 'too many open files' errors, you can either change this value, or change `ulimit` value.
|
||||||
|
|
|
@ -212,11 +212,11 @@ func (server *Server) listenProviders(stop chan bool) {
|
||||||
lastConfigs.Set(configMsg.ProviderName, &configMsg)
|
lastConfigs.Set(configMsg.ProviderName, &configMsg)
|
||||||
lastReceivedConfigurationValue := lastReceivedConfiguration.Get().(time.Time)
|
lastReceivedConfigurationValue := lastReceivedConfiguration.Get().(time.Time)
|
||||||
if time.Now().After(lastReceivedConfigurationValue.Add(time.Duration(server.globalConfiguration.ProvidersThrottleDuration))) {
|
if time.Now().After(lastReceivedConfigurationValue.Add(time.Duration(server.globalConfiguration.ProvidersThrottleDuration))) {
|
||||||
log.Debugf("Last %s config received more than %s, OK", configMsg.ProviderName, server.globalConfiguration.ProvidersThrottleDuration)
|
log.Debugf("Last %s config received more than %s, OK", configMsg.ProviderName, server.globalConfiguration.ProvidersThrottleDuration.String())
|
||||||
// last config received more than n s ago
|
// last config received more than n s ago
|
||||||
server.configurationValidatedChan <- configMsg
|
server.configurationValidatedChan <- configMsg
|
||||||
} else {
|
} else {
|
||||||
log.Debugf("Last %s config received less than %s, waiting...", configMsg.ProviderName, server.globalConfiguration.ProvidersThrottleDuration)
|
log.Debugf("Last %s config received less than %s, waiting...", configMsg.ProviderName, server.globalConfiguration.ProvidersThrottleDuration.String())
|
||||||
safe.Go(func() {
|
safe.Go(func() {
|
||||||
<-time.After(server.globalConfiguration.ProvidersThrottleDuration)
|
<-time.After(server.globalConfiguration.ProvidersThrottleDuration)
|
||||||
lastReceivedConfigurationValue := lastReceivedConfiguration.Get().(time.Time)
|
lastReceivedConfigurationValue := lastReceivedConfiguration.Get().(time.Time)
|
||||||
|
|
|
@ -30,14 +30,14 @@
|
||||||
#
|
#
|
||||||
# logLevel = "ERROR"
|
# logLevel = "ERROR"
|
||||||
|
|
||||||
# Backends throttle duration: minimum duration between 2 events from providers
|
# Backends throttle duration: minimum duration in seconds between 2 events from providers
|
||||||
# before applying a new configuration. It avoids unnecessary reloads if multiples events
|
# before applying a new configuration. It avoids unnecessary reloads if multiples events
|
||||||
# are sent in a short amount of time.
|
# are sent in a short amount of time.
|
||||||
#
|
#
|
||||||
# Optional
|
# Optional
|
||||||
# Default: "2s"
|
# Default: "2"
|
||||||
#
|
#
|
||||||
# ProvidersThrottleDuration = "5s"
|
# ProvidersThrottleDuration = "5"
|
||||||
|
|
||||||
# If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used.
|
# If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used.
|
||||||
# If you encounter 'too many open files' errors, you can either change this value, or change `ulimit` value.
|
# If you encounter 'too many open files' errors, you can either change this value, or change `ulimit` value.
|
||||||
|
|
Loading…
Reference in a new issue