diff options
author | 王清雨 <[email protected]> | 2021-07-29 05:39:08 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-28 15:39:08 -0600 |
commit | c131339c5cda3a541223fde4a714aab55de13b9a (patch) | |
tree | 8f5e82cf3596bb78497266e287e7f81e6ef35cc5 /admin.go | |
parent | b6f51254ea2dcb29dde0ffb4076802505a43ace1 (diff) | |
download | caddy-c131339c5cda3a541223fde4a714aab55de13b9a.tar.gz caddy-c131339c5cda3a541223fde4a714aab55de13b9a.zip |
admin: Implement load_interval to pull config on a timer (#4246)
* feat: implement a simple timer to pull config
mostly referenced to the issue
re #4106
* Update admin.go
use `caddy.Duration`
Co-authored-by: Matt Holt <[email protected]>
* Update caddy.go
Co-authored-by: Matt Holt <[email protected]>
* Update admin.go
Co-authored-by: Francis Lavoie <[email protected]>
* fix: sync load config when no pull interval provided
try not to make break change
* fix: change PullInterval to LoadInterval
* fix: change pull_interval to load_interval
* Update caddy.go
Co-authored-by: Matt Holt <[email protected]>
Co-authored-by: Matt Holt <[email protected]>
Co-authored-by: Francis Lavoie <[email protected]>
Diffstat (limited to 'admin.go')
-rw-r--r-- | admin.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -109,6 +109,12 @@ type ConfigSettings struct { // // EXPERIMENTAL: Subject to change. LoadRaw json.RawMessage `json:"load,omitempty" caddy:"namespace=caddy.config_loaders inline_key=module"` + + // The interval to pull config. With a non-zero value, will pull config + // from config loader (eg. a http loader) with given interval. + // + // EXPERIMENTAL: Subject to change. + LoadInterval Duration `json:"load_interval,omitempty"` } // IdentityConfig configures management of this server's identity. An identity |