mirror of
https://github.com/bloomberg/goldpinger.git
synced 2026-02-14 18:09:50 +00:00
@@ -107,6 +107,7 @@ func CheckCluster(ctx context.Context) *models.ClusterHealthResults {
|
||||
return &response
|
||||
}
|
||||
|
||||
// PingAllPodsResult holds results from pinging all nodes
|
||||
type PingAllPodsResult struct {
|
||||
podName string
|
||||
podResult models.PodResult
|
||||
@@ -138,6 +139,7 @@ func checkDNS() *models.DNSResults {
|
||||
return &results
|
||||
}
|
||||
|
||||
// CheckServicePodsResult results of the /check operation
|
||||
type CheckServicePodsResult struct {
|
||||
podName string
|
||||
checkAllPodResult models.CheckAllPodResult
|
||||
@@ -145,6 +147,7 @@ type CheckServicePodsResult struct {
|
||||
podIPv4 strfmt.IPv4
|
||||
}
|
||||
|
||||
// CheckAllPods calls all neighbours and returns a detailed report
|
||||
func CheckAllPods(checkAllCtx context.Context, pods map[string]*GoldpingerPod) *models.CheckAllResults {
|
||||
|
||||
result := models.CheckAllResults{Responses: make(map[string]models.CheckAllPodResult)}
|
||||
@@ -247,6 +250,7 @@ func CheckAllPods(checkAllCtx context.Context, pods map[string]*GoldpingerPod) *
|
||||
return &result
|
||||
}
|
||||
|
||||
// HealthCheck returns a simple 200 OK response to verify the API is up
|
||||
func HealthCheck() *models.HealthCheckResults {
|
||||
ok := true
|
||||
start := time.Now()
|
||||
|
||||
Reference in New Issue
Block a user