mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-11 00:56:14 +00:00
Pin dependencies and update vendors
This commit is contained in:
5
vendor/github.com/xiang90/probing/prober.go
generated
vendored
5
vendor/github.com/xiang90/probing/prober.go
generated
vendored
@@ -3,6 +3,7 @@ package probing
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -60,6 +61,10 @@ func (p *prober) AddHTTP(id string, probingInterval time.Duration, endpoints []s
|
||||
panic(err)
|
||||
}
|
||||
resp, err := p.tr.RoundTrip(req)
|
||||
if err == nil && resp.StatusCode != http.StatusOK {
|
||||
err = fmt.Errorf("got unexpected HTTP status code %s from %s", resp.Status, endpoints[pinned])
|
||||
resp.Body.Close()
|
||||
}
|
||||
if err != nil {
|
||||
s.recordFailure(err)
|
||||
pinned = (pinned + 1) % len(endpoints)
|
||||
|
||||
Reference in New Issue
Block a user