mirror of
https://github.com/pgsty/minio.git
synced 2026-08-08 23:33:30 +03:00
Consolidate controller rpc into one single service
This commit is contained in:
+28
-7
@@ -16,11 +16,19 @@
|
||||
|
||||
package main
|
||||
|
||||
// Network properties of a server
|
||||
type Network struct {
|
||||
IP string `json:"address"`
|
||||
Mask string `json:"netmask"`
|
||||
Ethernet string `json:"networkInterface"`
|
||||
//// RPC params
|
||||
|
||||
// AuthArgs auth params
|
||||
type AuthArgs struct {
|
||||
User string `json:"user"`
|
||||
}
|
||||
|
||||
// DonutArgs collections of disks and name to initialize donut
|
||||
type DonutArgs struct {
|
||||
Name string
|
||||
MaxSize uint64
|
||||
Hostname string
|
||||
Disks []string
|
||||
}
|
||||
|
||||
// ServerArg server metadata to identify a server
|
||||
@@ -30,6 +38,8 @@ type ServerArg struct {
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
//// RPC replies
|
||||
|
||||
// ServerRep server reply container for Server.List
|
||||
type ServerRep struct {
|
||||
Name string `json:"name"`
|
||||
@@ -39,7 +49,7 @@ type ServerRep struct {
|
||||
|
||||
// DefaultRep default reply
|
||||
type DefaultRep struct {
|
||||
Error int64 `json:"error"`
|
||||
Error error `json:"error"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
@@ -61,7 +71,11 @@ type MemStatsRep struct {
|
||||
|
||||
// NetStatsRep network statistics of a server
|
||||
type NetStatsRep struct {
|
||||
Interfaces []Network
|
||||
Interfaces []struct {
|
||||
IP string `json:"address"`
|
||||
Mask string `json:"netmask"`
|
||||
Ethernet string `json:"networkInterface"`
|
||||
}
|
||||
}
|
||||
|
||||
// SysInfoRep system information of a server
|
||||
@@ -86,3 +100,10 @@ type VersionRep struct {
|
||||
Architecture string `json:"arch"`
|
||||
OperatingSystem string `json:"os"`
|
||||
}
|
||||
|
||||
// AuthRep reply with access keys and secret ids for the user
|
||||
type AuthRep struct {
|
||||
Name string `json:"name"`
|
||||
AccessKeyID string `json:"accessKeyId"`
|
||||
SecretAccessKey string `json:"secretAccessKey"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user