mirror of
https://github.com/bloomberg/goldpinger.git
synced 2026-02-14 18:09:50 +00:00
Make it a bit more obvious
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
This commit is contained in:
@@ -154,16 +154,18 @@ func updateCounters() {
|
||||
}
|
||||
CountHealthyUnhealthyNodes(counterHealthy, float64(len(checkResults.PodResults))-counterHealthy)
|
||||
// check DNS, but don't block the access to checkResultsMux
|
||||
go func(healthy bool) {
|
||||
if healthy {
|
||||
nodesHealthy := int(counterHealthy) == len(checkResults.PodResults)
|
||||
go func(healthySoFar bool) {
|
||||
if healthySoFar {
|
||||
for _, response := range *checkDNS() {
|
||||
if response.Error != "" {
|
||||
healthy = false
|
||||
healthySoFar = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
SetClusterHealth(healthy)
|
||||
}(int(counterHealthy) == len(checkResults.PodResults))
|
||||
SetClusterHealth(healthySoFar)
|
||||
}(nodesHealthy)
|
||||
}
|
||||
|
||||
// collectResults simply reads results from the results channel and saves them in a map
|
||||
|
||||
Reference in New Issue
Block a user