From 7328d3e8c989f28a4b3480c907fca8e7d43aa76a Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Fri, 27 Sep 2019 11:10:47 +0100 Subject: [PATCH] plugin/reload: reflow documentation (#3313) * plugin/reload: reflow documentation For some reason these we're all bullets points, which made for awkward reading. Signed-off-by: Miek Gieben * typo Signed-off-by: Miek Gieben * Update plugin/reload/README.md Co-Authored-By: Michael Grosser --- plugin/reload/README.md | 11 ++++++----- plugin/reload/reload.go | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) 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