aboutsummaryrefslogtreecommitdiff
path: root/core/restart_windows.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-08-19 17:14:17 -0700
committerGravatar GitHub <noreply@github.com> 2016-08-19 17:14:17 -0700
commit9ac3cab1b7b1b1e78f86ce3c6a80fbee312162e6 (patch)
tree437e9755927c33af16276ad2602a6da115f948cb /core/restart_windows.go
parenta1989c35231b0e5ea271b2f68d82c1a63e697cd0 (diff)
downloadcoredns-9ac3cab1b7b1b1e78f86ce3c6a80fbee312162e6.tar.gz
coredns-9ac3cab1b7b1b1e78f86ce3c6a80fbee312162e6.tar.zst
coredns-9ac3cab1b7b1b1e78f86ce3c6a80fbee312162e6.zip
Make CoreDNS a server type plugin for Caddy (#220)
* Make CoreDNS a server type plugin for Caddy Remove code we don't need and port all middleware over. Fix all tests and rework the documentation. Also make `go generate` build a caddy binary which we then copy into our directory. This means `go build`-builds remain working as-is. And new etc instances in each etcd test for better isolation. Fix more tests and rework test.Server with the newer support Caddy offers. Fix Makefile to support new mode of operation.
Diffstat (limited to 'core/restart_windows.go')
-rw-r--r--core/restart_windows.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/core/restart_windows.go b/core/restart_windows.go
deleted file mode 100644
index 8a0805a19..000000000
--- a/core/restart_windows.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package core
-
-import "log"
-
-// Restart restarts CoreDNS forcefully using newCorefile,
-// or, if nil, the current/existing Corefile is reused.
-func Restart(newCorefile Input) error {
- log.Println("[INFO] Restarting")
-
- if newCorefile == nil {
- corefileMu.Lock()
- newCorefile = corefile
- corefileMu.Unlock()
- }
-
- wg.Add(1) // barrier so Wait() doesn't unblock
-
- err := Stop()
- if err != nil {
- return err
- }
-
- err = Start(newCorefile)
- if err != nil {
- return err
- }
-
- wg.Done() // take down our barrier
-
- return nil
-}