diff --git a/plugin/reload/README.md b/plugin/reload/README.md index ca80f8602..f50116cf4 100644 --- a/plugin/reload/README.md +++ b/plugin/reload/README.md @@ -38,11 +38,12 @@ This plugin can only be used once per Server Block. reload [INTERVAL] [JITTER] ~~~ -* The plugin will check for changes every **INTERVAL**, subject to +/- the **JITTER** duration -* **INTERVAL** and **JITTER** are Golang (durations)[https://golang.org/pkg/time/#ParseDuration] -* Default **INTERVAL** is 30s, default **JITTER** is 15s -* Minimal value for **INTERVAL** is 2s, and for **JITTER** is 1s -* If **JITTER** is more than half of **INTERVAL**, it will be set to half of **INTERVAL** +The plugin will check for changes every **INTERVAL**, subject to +/- the **JITTER** duration. + +* **INTERVAL** and **JITTER** are Golang (durations)[[https://golang.org/pkg/time/#ParseDuration](https://golang.org/pkg/time/#ParseDuration)]. + The default **INTERVAL** is 30s, default **JITTER** is 15s, the minimal value for **INTERVAL** + is 2s, and for **JITTER** it is 1s. If **JITTER** is more than half of **INTERVAL**, it will be + set to half of **INTERVAL** ## Examples diff --git a/plugin/reload/reload.go b/plugin/reload/reload.go index 0e01f63b4..817582c8c 100644 --- a/plugin/reload/reload.go +++ b/plugin/reload/reload.go @@ -1,3 +1,4 @@ +// Package reload periodically checks if the Corefile has changed, and reloads if so. package reload import ( @@ -11,7 +12,6 @@ import ( "github.com/caddyserver/caddy/caddyfile" ) -// reload periodically checks if the Corefile has changed, and reloads if so const ( unused = 0 maybeUsed = 1