Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c62c63249c | |||
| 6c290eb66b |
@@ -70,9 +70,8 @@ func (s *Service) GetID() string {
|
||||
}
|
||||
|
||||
func (s *Service) GetFullAddr() string {
|
||||
isTLS := s.port == 443
|
||||
proto := "http"
|
||||
if isTLS {
|
||||
if s.tls {
|
||||
proto = "https"
|
||||
}
|
||||
return fmt.Sprintf("%s://%s:%d/", proto, s.Address, s.port)
|
||||
@@ -160,7 +159,7 @@ func (s *Service) healthCheck() (bool, error) {
|
||||
alive := func() bool {
|
||||
client := &http.Client{}
|
||||
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)
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user