mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
healhcheck: various cleanups (#1106)
* healhcheck: various cleanups Network wasn't used. IgnorePaths wasn't used. Move checkdown function to common function shared between proxy protocols. And some naming fixed. Also reset the Fails on a succesful healthcheck back to 0. remove newlines from log * compile * fix test
This commit is contained in:
@@ -23,10 +23,8 @@ type apiProxy struct {
|
||||
func (p *proxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
upstream := p.Select()
|
||||
network := "tcp"
|
||||
if upstream.Network != "" {
|
||||
network = upstream.Network
|
||||
}
|
||||
address := upstream.Name
|
||||
|
||||
d, err := net.Dial(network, address)
|
||||
if err != nil {
|
||||
log.Printf("[ERROR] Unable to establish connection to upstream %s://%s: %s", network, address, err)
|
||||
|
||||
Reference in New Issue
Block a user