mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
Merge cmd/donut into minio cmd, deprecate controller RPC request
This commit is contained in:
@@ -109,31 +109,4 @@ func GetAuthKeys(url string) ([]byte, error) {
|
||||
return json.MarshalIndent(reply, "", "\t")
|
||||
}
|
||||
|
||||
// SetDonut - set donut config
|
||||
func SetDonut(url, hostname string, disks []string) error {
|
||||
op := RPCOps{
|
||||
Method: "Donut.Set",
|
||||
Request: rpc.DonutArgs{
|
||||
Hostname: hostname,
|
||||
Disks: disks,
|
||||
Name: "default",
|
||||
MaxSize: 512000000,
|
||||
},
|
||||
}
|
||||
req, err := NewRequest(url, op, http.DefaultTransport)
|
||||
if err != nil {
|
||||
return iodine.New(err, nil)
|
||||
}
|
||||
resp, err := req.Do()
|
||||
defer closeResp(resp)
|
||||
if err != nil {
|
||||
return iodine.New(err, nil)
|
||||
}
|
||||
var reply rpc.Reply
|
||||
if err := jsonrpc.DecodeClientResponse(resp.Body, &reply); err != nil {
|
||||
return iodine.New(err, nil)
|
||||
}
|
||||
return reply.Error
|
||||
}
|
||||
|
||||
// Add more functions here for other RPC messages
|
||||
|
||||
Reference in New Issue
Block a user