Also add a total number of nodes in a field for convenience

Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
This commit is contained in:
Mikolaj Pawlikowski
2021-03-12 13:31:01 +00:00
parent 1310f9b12b
commit 5d2ad6ce19
3 changed files with 14 additions and 0 deletions
+3
View File
@@ -33,6 +33,9 @@ type ClusterHealthResults struct {
// nodes healthy
NodesHealthy []string `json:"nodesHealthy"`
// nodes total
NodesTotal int64 `json:"nodesTotal,omitempty"`
// nodes unhealthy
NodesUnhealthy []string `json:"nodesUnhealthy"`
}
+8
View File
@@ -249,6 +249,10 @@ func init() {
"type": "string"
}
},
"nodesTotal": {
"type": "integer",
"format": "int64"
},
"nodesUnhealthy": {
"type": "array",
"items": {
@@ -576,6 +580,10 @@ func init() {
"type": "string"
}
},
"nodesTotal": {
"type": "integer",
"format": "int64"
},
"nodesUnhealthy": {
"type": "array",
"items": {
+3
View File
@@ -144,6 +144,9 @@ definitions:
type: array
items:
type: string
nodesTotal:
type: integer
format: int64
generated-at:
type: string
format: date-time