mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-17 01:45:27 +02:00
all: change refresh_time -> refetch_time
The custom config is refetched from API, not refresh.
This commit is contained in:
+2
-2
@@ -247,8 +247,8 @@ func (p *prog) apiConfigReload() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
secs := 3600
|
secs := 3600
|
||||||
if p.cfg.Service.RefreshTime != nil && *p.cfg.Service.RefreshTime > 0 {
|
if p.cfg.Service.RefetchTime != nil && *p.cfg.Service.RefetchTime > 0 {
|
||||||
secs = *p.cfg.Service.RefreshTime
|
secs = *p.cfg.Service.RefetchTime
|
||||||
}
|
}
|
||||||
|
|
||||||
ticker := time.NewTicker(time.Duration(secs) * time.Second)
|
ticker := time.NewTicker(time.Duration(secs) * time.Second)
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ type ServiceConfig struct {
|
|||||||
MetricsListener string `mapstructure:"metrics_listener" toml:"metrics_listener,omitempty"`
|
MetricsListener string `mapstructure:"metrics_listener" toml:"metrics_listener,omitempty"`
|
||||||
DnsWatchdogEnabled *bool `mapstructure:"dns_watchdog_enabled" toml:"dns_watchdog_enabled,omitempty"`
|
DnsWatchdogEnabled *bool `mapstructure:"dns_watchdog_enabled" toml:"dns_watchdog_enabled,omitempty"`
|
||||||
DnsWatchdogInvterval *time.Duration `mapstructure:"dns_watchdog_interval" toml:"dns_watchdog_interval,omitempty"`
|
DnsWatchdogInvterval *time.Duration `mapstructure:"dns_watchdog_interval" toml:"dns_watchdog_interval,omitempty"`
|
||||||
RefreshTime *int `mapstructure:"refresh_time" toml:"refresh_time,omitempty"`
|
RefetchTime *int `mapstructure:"refetch_time" toml:"refetch_time,omitempty"`
|
||||||
Daemon bool `mapstructure:"-" toml:"-"`
|
Daemon bool `mapstructure:"-" toml:"-"`
|
||||||
AllocateIP bool `mapstructure:"-" toml:"-"`
|
AllocateIP bool `mapstructure:"-" toml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -273,7 +273,7 @@ If the time duration is non-positive, default value will be used.
|
|||||||
- Required: no
|
- Required: no
|
||||||
- Default: 20s
|
- Default: 20s
|
||||||
|
|
||||||
### refresh_time
|
### refetch_time
|
||||||
Time in seconds between each iteration that reloads custom config if changed.
|
Time in seconds between each iteration that reloads custom config if changed.
|
||||||
|
|
||||||
The value must be a positive number, any invalid value will be ignored and default value will be used.
|
The value must be a positive number, any invalid value will be ignored and default value will be used.
|
||||||
|
|||||||
Reference in New Issue
Block a user