mirror of
https://github.com/coredns/coredns.git
synced 2025-11-21 03:12:16 -05:00
plugin/health: cleanups (#2811)
Small, trivial cleanup: got triggered because I saw a comment on how health plugins polls other plugins which isn't true. * Remove useless newHealth function * healthParse -> parse * Remove useless constants Net deletion of code. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -18,6 +18,7 @@ func (h *health) overloaded() {
|
||||
}
|
||||
url := "http://" + h.Addr
|
||||
tick := time.NewTicker(1 * time.Second)
|
||||
defer tick.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
@@ -32,7 +33,6 @@ func (h *health) overloaded() {
|
||||
HealthDuration.Observe(time.Since(start).Seconds())
|
||||
|
||||
case <-h.stop:
|
||||
tick.Stop()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user