Consul debug
This commit is contained in:
parent
1433b69abe
commit
7bfd048051
@ -117,12 +117,14 @@ func (s *Service) healthCheck() (bool, error) {
|
||||
healthUrl := s.GetFullAddr() + "health"
|
||||
req, err := http.NewRequest(http.MethodGet, healthUrl, nil)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to create new Consul request: %v\n", err)
|
||||
return false
|
||||
}
|
||||
req.Header.Set("User-Agent", "Health Check")
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to send Consul request: %v\n", err)
|
||||
return false
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user