update storageos vendor for FilteredDial change

This commit is contained in:
Matthew Cary
2020-06-10 01:02:40 +00:00
parent 2aa1cd25f3
commit 74dbf274d9
58 changed files with 239 additions and 193 deletions

View File

@@ -14,6 +14,22 @@ var (
HealthAPIPrefix = "health"
)
func (c *Client) ClusterHealth(ctx context.Context) ([]*types.ClusterHealthNode, error) {
status := []*types.ClusterHealthNode{}
url := fmt.Sprintf("/cluster/%s", HealthAPIPrefix)
resp, err := c.do("GET", url, doOptions{context: ctx, retryOn: []int{http.StatusNotFound}})
if err != nil {
return nil, err
}
defer resp.Body.Close()
if err := json.NewDecoder(resp.Body).Decode(&status); err != nil {
return nil, err
}
return status, nil
}
// CPHealth returns the health of the control plane server at a given url.
func (c *Client) CPHealth(ctx context.Context, hostname string) (*types.CPHealthStatus, error) {