Regenerate

Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
This commit is contained in:
Mikolaj Pawlikowski
2021-03-12 13:06:26 +00:00
parent b0730e88df
commit 807f193b07
3 changed files with 10 additions and 55 deletions

View File

@@ -19,9 +19,6 @@ import (
// swagger:model ClusterHealthResults
type ClusterHealthResults struct {
// DNS
DNS []string `json:"DNS"`
// o k
// Required: true
OK bool `json:"OK"`
@@ -33,17 +30,11 @@ type ClusterHealthResults struct {
// Format: date-time
GeneratedAt strfmt.DateTime `json:"generated-at,omitempty"`
// hosts healthy
HostsHealthy []string `json:"hostsHealthy"`
// nodes healthy
NodesHealthy []string `json:"nodesHealthy"`
// hosts unhealthy
HostsUnhealthy []string `json:"hostsUnhealthy"`
// pods healthy
PodsHealthy []string `json:"podsHealthy"`
// pods unhealthy
PodsUnhealthy []string `json:"podsUnhealthy"`
// nodes unhealthy
NodesUnhealthy []string `json:"nodesUnhealthy"`
}
// Validate validates this cluster health results

View File

@@ -104,8 +104,8 @@ func configureAPI(api *operations.GoldpingerAPI) http.Handler {
)
defer cancel()
ok, payload := goldpinger.CheckCluster(ctx)
if ok {
payload := goldpinger.CheckCluster(ctx)
if payload.OK {
return operations.NewClusterHealthOK().WithPayload(payload)
} else {
return operations.NewClusterHealthServiceUnavailable().WithPayload(payload)

View File

@@ -231,12 +231,6 @@ func init() {
"OK"
],
"properties": {
"DNS": {
"type": "array",
"items": {
"type": "string"
}
},
"OK": {
"type": "boolean",
"default": false
@@ -249,25 +243,13 @@ func init() {
"type": "string",
"format": "date-time"
},
"hostsHealthy": {
"nodesHealthy": {
"type": "array",
"items": {
"type": "string"
}
},
"hostsUnhealthy": {
"type": "array",
"items": {
"type": "string"
}
},
"podsHealthy": {
"type": "array",
"items": {
"type": "string"
}
},
"podsUnhealthy": {
"nodesUnhealthy": {
"type": "array",
"items": {
"type": "string"
@@ -576,12 +558,6 @@ func init() {
"OK"
],
"properties": {
"DNS": {
"type": "array",
"items": {
"type": "string"
}
},
"OK": {
"type": "boolean",
"default": false
@@ -594,25 +570,13 @@ func init() {
"type": "string",
"format": "date-time"
},
"hostsHealthy": {
"nodesHealthy": {
"type": "array",
"items": {
"type": "string"
}
},
"hostsUnhealthy": {
"type": "array",
"items": {
"type": "string"
}
},
"podsHealthy": {
"type": "array",
"items": {
"type": "string"
}
},
"podsUnhealthy": {
"nodesUnhealthy": {
"type": "array",
"items": {
"type": "string"