| 35 | } |
| 36 | |
| 37 | func Health(baseParams BaseParams, readyToRebalance ...bool) error { |
| 38 | var q url.Values |
| 39 | baseParams.Method = http.MethodGet |
| 40 | if len(readyToRebalance) > 0 && readyToRebalance[0] { |
| 41 | q = url.Values{apc.QparamPrimaryReadyReb: []string{"true"}} |
| 42 | } |
| 43 | reqParams := AllocRp() |
| 44 | { |
| 45 | reqParams.BaseParams = baseParams |
| 46 | reqParams.Path = apc.URLPathHealth.S |
| 47 | reqParams.Query = q |
| 48 | } |
| 49 | err := reqParams.DoHTTPRequest() |
| 50 | FreeRp(reqParams) |
| 51 | return err |
| 52 | } |
| 53 | |
| 54 | // GetClusterMap retrieves AIStore cluster map. |
| 55 | func GetClusterMap(baseParams BaseParams) (smap *cluster.Smap, err error) { |