core: make coredns.Server a caddy.GracefulServer (#520)

* core: make coredns.Server a caddy.GracefulServer

We needed to also implement the Address() method.

Fixes: #519

* Add compile time check if we implement caddy.GracefulServer

* Check if we should shutdown
This commit is contained in:
Miek Gieben
2017-02-10 19:50:31 +00:00
committed by GitHub
parent 3e196a6d57
commit 5f6c7682be
2 changed files with 12 additions and 2 deletions

View File

@@ -140,3 +140,5 @@ var (
// GracefulTimeout is the maximum duration of a graceful shutdown.
GracefulTimeout time.Duration
)
var _ caddy.GracefulServer = new(Server)