mirror of
https://github.com/minio/minio.git
synced 2025-11-23 02:57:42 -05:00
Remove unusued params and functions (#8399)
This commit is contained in:
@@ -19,7 +19,6 @@ package madmin
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
@@ -29,14 +28,12 @@ import (
|
||||
|
||||
// ServiceRestart - restarts the MinIO cluster
|
||||
func (adm *AdminClient) ServiceRestart() error {
|
||||
_, err := adm.serviceCallAction(ServiceActionRestart)
|
||||
return err
|
||||
return adm.serviceCallAction(ServiceActionRestart)
|
||||
}
|
||||
|
||||
// ServiceStop - stops the MinIO cluster
|
||||
func (adm *AdminClient) ServiceStop() error {
|
||||
_, err := adm.serviceCallAction(ServiceActionStop)
|
||||
return err
|
||||
return adm.serviceCallAction(ServiceActionStop)
|
||||
}
|
||||
|
||||
// ServiceAction - type to restrict service-action values
|
||||
@@ -50,7 +47,7 @@ const (
|
||||
)
|
||||
|
||||
// serviceCallAction - call service restart/update/stop API.
|
||||
func (adm *AdminClient) serviceCallAction(action ServiceAction) ([]byte, error) {
|
||||
func (adm *AdminClient) serviceCallAction(action ServiceAction) error {
|
||||
queryValues := url.Values{}
|
||||
queryValues.Set("action", string(action))
|
||||
|
||||
@@ -61,14 +58,14 @@ func (adm *AdminClient) serviceCallAction(action ServiceAction) ([]byte, error)
|
||||
})
|
||||
defer closeResponse(resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, httpRespToErrorResponse(resp)
|
||||
return httpRespToErrorResponse(resp)
|
||||
}
|
||||
|
||||
return ioutil.ReadAll(resp.Body)
|
||||
return nil
|
||||
}
|
||||
|
||||
// ServiceTraceInfo holds http trace
|
||||
|
||||
Reference in New Issue
Block a user