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:
parent
102cfbd7fe
commit
148a99442d
8 changed files with 65 additions and 118 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue