From 7bfd048051d7debcede209612295db27fcc32489 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Wed, 28 Jun 2023 22:50:16 +0200 Subject: [PATCH] Consul debug --- consul/discovery.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/consul/discovery.go b/consul/discovery.go index 466ff18..113a4ef 100644 --- a/consul/discovery.go +++ b/consul/discovery.go @@ -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()