Compare commits

..

2 Commits

Author SHA1 Message Date
974f82e9be debug fix 2024-07-20 15:53:05 +02:00
d7dc75c18f debug fix 2024-07-20 15:45:49 +02:00

View File

@@ -74,7 +74,7 @@ func (s *Service) GetFullAddr() string {
if s.tls { if s.tls {
proto = "https" proto = "https"
} }
return fmt.Sprintf("%s://%s:%d/", proto, s.Address, s.port) return fmt.Sprintf("%s://%s:%d/", proto, s.domain, s.port)
} }
func (s *Service) Register() error { func (s *Service) Register() error {
@@ -159,7 +159,7 @@ func (s *Service) healthCheck() (bool, error) {
alive := func() bool { alive := func() bool {
client := &http.Client{} client := &http.Client{}
healthUrl := fmt.Sprintf("%s%s?name=%s", s.GetFullAddr(), "health", s.Name) healthUrl := fmt.Sprintf("%s%s?name=%s", s.GetFullAddr(), "health", s.Name)
// fmt.Printf("HealthCheck URL: %s%s?name=%s", s.GetFullAddr(), "health", s.Name) fmt.Printf("HealthCheck URL: %s%s?name=%s", s.GetFullAddr(), "health", s.Name)
req, err := http.NewRequest(http.MethodGet, healthUrl, nil) req, err := http.NewRequest(http.MethodGet, healthUrl, nil)
if err != nil { if err != nil {
return false return false