Compare commits

...

3 Commits

Author SHA1 Message Date
43c8dd3ad0 Debug 2023-06-29 15:24:59 +02:00
e57e43188c Recognization of ping request for consul 2023-06-29 15:18:35 +02:00
672a350f31 Recognization of ping request for consul 2023-06-29 15:15:03 +02:00

View File

@@ -120,13 +120,14 @@ func (s *Service) KV() *consul.KV {
func (s *Service) healthCheck() (bool, error) {
alive := func() bool {
client := &http.Client{}
healthUrl := s.GetFullAddr() + "health"
healthUrl := fmt.Sprintf("%s%s?name=%s", s.GetFullAddr(), "health", s.Name)
req, err := http.NewRequest(http.MethodGet, healthUrl, nil)
if err != nil {
return false
}
req.Header.Set("User-Agent", "service/internal")
fmt.Printf("Sending HEALTH CHECK request to: %s", healthUrl)
resp, err := client.Do(req)
if err != nil {
return false