Fix graceful reload (#141)

Fix CoreDNS graceful reloading. This uses the same stuff as Caddy
(obviously), but extends it for UDP listeners as well. Also add to the
README that we *will* call Shutdown for middleware.

Fixes #4
This commit is contained in:
Miek Gieben
2016-04-28 21:15:45 +01:00
parent e34280e7af
commit a1478f891d
5 changed files with 91 additions and 130 deletions

View File

@@ -42,7 +42,8 @@ type Config struct {
FirstStartup []func() error
// Functions (or methods) to execute when the server quits;
// these are executed in response to SIGINT and are blocking
// these are executed in response to SIGINT and are blocking. These
// function are *also* called when we are restarting.
Shutdown []func() error
// The path to the configuration file from which this was loaded