Consul debug

This commit is contained in:
Piotr Biernat 2023-06-28 23:22:15 +02:00
parent 0aa79c7d35
commit fc88125fe4

View File

@ -119,7 +119,7 @@ func (s *Service) healthCheck() (bool, error) {
if err != nil {
return false
}
req.Header.Set("User-Agent", "Health Check")
req.Header.Set("User-Agent", "service/internal")
resp, err := client.Do(req)
if err != nil {
@ -132,6 +132,7 @@ func (s *Service) healthCheck() (bool, error) {
if alive {
if err := s.agent.PassTTL("service:"+s.GetID(), "OK"); err != nil {
fmt.Printf("Failed to pass TTL: %v", err)
return false, err
}
return true, nil