Documentation ¶
Index ¶
- Constants
- Variables
- func DecryptData(password string, data io.Reader) ([]byte, error)
- func EncryptData(password string, data []byte) ([]byte, error)
- func ErrInvalidArgument(message string) error
- type AccountStatus
- type AdminClient
- func (adm *AdminClient) AddCannedPolicy(policyName, policy string) error
- func (adm *AdminClient) AddUser(accessKey, secretKey string) error
- func (adm *AdminClient) BackgroundHealStatus() (BgHealState, error)
- func (adm *AdminClient) ClearConfigHistoryKV(restoreID string) (err error)
- func (adm *AdminClient) DelConfigKV(k string) (err error)
- func (adm *AdminClient) DownloadProfilingData() (io.ReadCloser, error)
- func (adm *AdminClient) GetConfig() ([]byte, error)
- func (adm *AdminClient) GetConfigKV(key string) (Targets, error)
- func (adm *AdminClient) GetGroupDescription(group string) (*GroupDesc, error)
- func (adm *AdminClient) GetKeyStatus(keyID string) (*KMSKeyStatus, error)
- func (adm AdminClient) GetLogs(node string, lineCnt int, logKind string, doneCh <-chan struct{}) <-chan LogInfo
- func (adm *AdminClient) GetUserInfo(name string) (u UserInfo, err error)
- func (adm *AdminClient) Heal(bucket, prefix string, healOpts HealOpts, clientToken string, ...) (healStart HealStartSuccess, healTaskStatus HealTaskStatus, err error)
- func (adm *AdminClient) HelpConfigKV(subSys, key string, envOnly bool) (map[string]string, error)
- func (adm *AdminClient) InfoCannedPolicy(policyName string) ([]byte, error)
- func (adm *AdminClient) ListCannedPolicies() (map[string][]byte, error)
- func (adm *AdminClient) ListConfigHistoryKV(count int) ([]ConfigHistoryEntry, error)
- func (adm *AdminClient) ListGroups() ([]string, error)
- func (adm *AdminClient) ListUsers() (map[string]UserInfo, error)
- func (adm *AdminClient) NetPerfInfo(size int) (map[string][]NetPerfInfo, error)
- func (adm *AdminClient) RemoveCannedPolicy(policyName string) error
- func (adm *AdminClient) RemoveUser(accessKey string) error
- func (adm *AdminClient) RestoreConfigHistoryKV(restoreID string) (err error)
- func (adm *AdminClient) ServerCPUHardwareInfo() ([]ServerCPUHardwareInfo, error)
- func (adm *AdminClient) ServerCPULoadInfo() ([]ServerCPULoadInfo, error)
- func (adm *AdminClient) ServerDrivesPerfInfo(size int64) ([]ServerDrivesPerfInfo, error)
- func (adm *AdminClient) ServerInfo() ([]ServerInfo, error)
- func (adm *AdminClient) ServerMemUsageInfo() ([]ServerMemUsageInfo, error)
- func (adm *AdminClient) ServerNetworkHardwareInfo() ([]ServerNetworkHardwareInfo, error)
- func (adm *AdminClient) ServerUpdate(updateURL string) (us ServerUpdateStatus, err error)
- func (adm *AdminClient) ServiceRestart() error
- func (adm *AdminClient) ServiceStop() error
- func (adm AdminClient) ServiceTrace(allTrace, errTrace bool, doneCh <-chan struct{}) <-chan ServiceTraceInfo
- func (adm *AdminClient) SetAppInfo(appName string, appVersion string)
- func (adm *AdminClient) SetConfig(config io.Reader) (err error)
- func (adm *AdminClient) SetConfigKV(kv string) (err error)
- func (adm *AdminClient) SetCustomTransport(customHTTPTransport http.RoundTripper)
- func (adm *AdminClient) SetGroupStatus(group string, status GroupStatus) error
- func (adm *AdminClient) SetPolicy(policyName, entityName string, isGroup bool) error
- func (adm *AdminClient) SetUser(accessKey, secretKey string, status AccountStatus) error
- func (adm *AdminClient) SetUserStatus(accessKey string, status AccountStatus) error
- func (adm *AdminClient) StartProfiling(profiler ProfilerType) ([]StartProfilingResult, error)
- func (adm *AdminClient) StorageInfo() (StorageInfo, error)
- func (adm *AdminClient) TopLocks() (LockEntries, error)
- func (adm *AdminClient) TraceOff()
- func (adm *AdminClient) TraceOn(outputStream io.Writer)
- func (adm *AdminClient) UpdateGroupMembers(g GroupAddRemove) error
- type BackendDisks
- type BackendType
- type BgHealState
- type ConfigHistoryEntry
- type DriveInfo
- type ErrorResponse
- type GroupAddRemove
- type GroupDesc
- type GroupStatus
- type HardwareType
- type HealDriveInfo
- type HealItemType
- type HealOpts
- type HealResultItem
- type HealScanMode
- type HealStartSuccess
- type HealStopSuccess
- type HealTaskStatus
- type KMSKeyStatus
- type KVS
- type LockEntries
- type LockEntry
- type LogInfo
- type NetPerfInfo
- type ProfilerType
- type ServerCPUHardwareInfo
- type ServerCPULoadInfo
- type ServerConnStats
- type ServerDrivesPerfInfo
- type ServerHTTPMethodStats
- type ServerHTTPStats
- type ServerInfo
- type ServerInfoData
- type ServerMemUsageInfo
- type ServerNetworkHardwareInfo
- type ServerProperties
- type ServerUpdateStatus
- type ServiceAction
- type ServiceTraceInfo
- type StartProfilingResult
- type StorageInfo
- type Targets
- type UserInfo
Constants ¶
const ( HealItemMetadata HealItemType = "metadata" HealItemBucket = "bucket" HealItemBucketMetadata = "bucket-metadata" HealItemObject = "object" )
HealItemType constants
const ( DriveStateOk string = "ok" DriveStateOffline = "offline" DriveStateCorrupt = "corrupt" DriveStateMissing = "missing" )
Drive state constants
const ( // DefaultNetPerfSize - default payload size used for network performance. DefaultNetPerfSize = 100 * humanize.MiByte // DefaultDrivePerfSize - default file size for testing drive performance DefaultDrivePerfSize = 100 * humanize.MiByte )
const ( SubSystemSeparator = `:` KvSeparator = `=` KvSpaceSeparator = ` ` KvNewline = "\n" KvDoubleQuote = `"` KvSingleQuote = `'` Default = `_` )
Constant separators
const ( ProfilerCPU ProfilerType = "cpu" // represents CPU profiler type ProfilerMEM = "mem" // represents MEM profiler type ProfilerBlock = "block" // represents Block profiler type ProfilerMutex = "mutex" // represents Mutex profiler type ProfilerTrace = "trace" // represents Trace profiler type )
Different supported profiler types.
const (
// AdminAPIVersion - admin api version used in the request.
AdminAPIVersion = "v2"
)
const DefaultRetryCap = time.Second * 30
DefaultRetryCap - Each retry attempt never waits no longer than this maximum time duration.
const DefaultRetryUnit = time.Second
DefaultRetryUnit - default unit multiplicative per retry. defaults to 1 second.
const MaxJitter = 1.0
MaxJitter will randomize over the full exponential backoff time
const NoJitter = 0.0
NoJitter disables the use of jitter for randomizing the exponential backoff time
Variables ¶
var ErrMaliciousData = sio.NotAuthentic
ErrMaliciousData indicates that the stream cannot be decrypted by provided credentials.
var MaxRetry = 10
MaxRetry is the maximum number of retries before stopping.
Functions ¶
func DecryptData ¶
DecryptData decrypts the data with the key derived from the salt (part of data) and the password using the PBKDF used in EncryptData. DecryptData returns the decrypted plaintext on success.
The data must be a valid ciphertext produced by EncryptData. Otherwise, the decryption will fail.
func EncryptData ¶
EncryptData encrypts the data with an unique key derived from password using the Argon2id PBKDF.
The returned ciphertext data consists of:
salt | AEAD ID | nonce | encrypted data 32 1 8 ~ len(data)
func ErrInvalidArgument ¶
ErrInvalidArgument - Invalid argument response.
Types ¶
type AccountStatus ¶
type AccountStatus string
AccountStatus - account status.
const ( AccountEnabled AccountStatus = "enabled" AccountDisabled AccountStatus = "disabled" )
Account status per user.
type AdminClient ¶
type AdminClient struct {
// contains filtered or unexported fields
}
AdminClient implements Amazon S3 compatible methods.
func New ¶
func New(endpoint string, accessKeyID, secretAccessKey string, secure bool) (*AdminClient, error)
New - instantiate minio client Client, adds automatic verification of signature.
func (*AdminClient) AddCannedPolicy ¶
func (adm *AdminClient) AddCannedPolicy(policyName, policy string) error
AddCannedPolicy - adds a policy for a canned.
func (*AdminClient) AddUser ¶
func (adm *AdminClient) AddUser(accessKey, secretKey string) error
AddUser - adds a user.
func (*AdminClient) BackgroundHealStatus ¶
func (adm *AdminClient) BackgroundHealStatus() (BgHealState, error)
BackgroundHealStatus returns the background heal status of the current server or cluster.
func (*AdminClient) ClearConfigHistoryKV ¶
func (adm *AdminClient) ClearConfigHistoryKV(restoreID string) (err error)
ClearConfigHistoryKV - clears the config entry represented by restoreID. optionally allows setting `all` as a special keyword to automatically erase all config set history entires.
func (*AdminClient) DelConfigKV ¶
func (adm *AdminClient) DelConfigKV(k string) (err error)
DelConfigKV - delete key from server config.
func (*AdminClient) DownloadProfilingData ¶
func (adm *AdminClient) DownloadProfilingData() (io.ReadCloser, error)
DownloadProfilingData makes an admin call to download profiling data of a standalone server or of the whole cluster in case of a distributed setup.
func (*AdminClient) GetConfig ¶
func (adm *AdminClient) GetConfig() ([]byte, error)
GetConfig - returns the config.json of a minio setup, incoming data is encrypted.
func (*AdminClient) GetConfigKV ¶
func (adm *AdminClient) GetConfigKV(key string) (Targets, error)
GetConfigKV - returns the key, value of the requested key, incoming data is encrypted.
func (*AdminClient) GetGroupDescription ¶
func (adm *AdminClient) GetGroupDescription(group string) (*GroupDesc, error)
GetGroupDescription - fetches information on a group.
func (*AdminClient) GetKeyStatus ¶
func (adm *AdminClient) GetKeyStatus(keyID string) (*KMSKeyStatus, error)
GetKeyStatus requests status information about the key referenced by keyID from the KMS connected to a MinIO by performing a Admin-API request. It basically hits the `/minio/admin/v2/kms/key/status` API endpoint.
func (AdminClient) GetLogs ¶
func (adm AdminClient) GetLogs(node string, lineCnt int, logKind string, doneCh <-chan struct{}) <-chan LogInfo
GetLogs - listen on console log messages.
func (*AdminClient) GetUserInfo ¶
func (adm *AdminClient) GetUserInfo(name string) (u UserInfo, err error)
GetUserInfo - get info on a user
func (*AdminClient) Heal ¶
func (adm *AdminClient) Heal(bucket, prefix string, healOpts HealOpts, clientToken string, forceStart, forceStop bool) ( healStart HealStartSuccess, healTaskStatus HealTaskStatus, err error)
Heal - API endpoint to start heal and to fetch status forceStart and forceStop are mutually exclusive, you can either set one of them to 'true'. If both are set 'forceStart' will be honored.
func (*AdminClient) HelpConfigKV ¶
HelpConfigKV - return help for a given sub-system.
func (*AdminClient) InfoCannedPolicy ¶
func (adm *AdminClient) InfoCannedPolicy(policyName string) ([]byte, error)
InfoCannedPolicy - expand canned policy into JSON structure.
func (*AdminClient) ListCannedPolicies ¶
func (adm *AdminClient) ListCannedPolicies() (map[string][]byte, error)
ListCannedPolicies - list all configured canned policies.
func (*AdminClient) ListConfigHistoryKV ¶
func (adm *AdminClient) ListConfigHistoryKV(count int) ([]ConfigHistoryEntry, error)
ListConfigHistoryKV - lists a slice of ConfigHistoryEntries sorted by createTime.
func (*AdminClient) ListGroups ¶
func (adm *AdminClient) ListGroups() ([]string, error)
ListGroups - lists all groups names present on the server.
func (*AdminClient) ListUsers ¶
func (adm *AdminClient) ListUsers() (map[string]UserInfo, error)
ListUsers - list all users.
func (*AdminClient) NetPerfInfo ¶
func (adm *AdminClient) NetPerfInfo(size int) (map[string][]NetPerfInfo, error)
NetPerfInfo - Returns network performance information of all cluster nodes.
func (*AdminClient) RemoveCannedPolicy ¶
func (adm *AdminClient) RemoveCannedPolicy(policyName string) error
RemoveCannedPolicy - remove a policy for a canned.
func (*AdminClient) RemoveUser ¶
func (adm *AdminClient) RemoveUser(accessKey string) error
RemoveUser - remove a user.
func (*AdminClient) RestoreConfigHistoryKV ¶
func (adm *AdminClient) RestoreConfigHistoryKV(restoreID string) (err error)
RestoreConfigHistoryKV - Restore a previous config set history. Input is a unique id which represents the previous setting.
func (*AdminClient) ServerCPUHardwareInfo ¶
func (adm *AdminClient) ServerCPUHardwareInfo() ([]ServerCPUHardwareInfo, error)
ServerCPUHardwareInfo - Returns cpu hardware information
func (*AdminClient) ServerCPULoadInfo ¶
func (adm *AdminClient) ServerCPULoadInfo() ([]ServerCPULoadInfo, error)
ServerCPULoadInfo - Returns cpu utilization information
func (*AdminClient) ServerDrivesPerfInfo ¶
func (adm *AdminClient) ServerDrivesPerfInfo(size int64) ([]ServerDrivesPerfInfo, error)
ServerDrivesPerfInfo - Returns drive's read and write performance information
func (*AdminClient) ServerInfo ¶
func (adm *AdminClient) ServerInfo() ([]ServerInfo, error)
ServerInfo - Connect to a minio server and call Server Info Management API to fetch server's information represented by ServerInfo structure
func (*AdminClient) ServerMemUsageInfo ¶
func (adm *AdminClient) ServerMemUsageInfo() ([]ServerMemUsageInfo, error)
ServerMemUsageInfo - Returns mem utilization information
func (*AdminClient) ServerNetworkHardwareInfo ¶
func (adm *AdminClient) ServerNetworkHardwareInfo() ([]ServerNetworkHardwareInfo, error)
ServerNetworkHardwareInfo - Returns network hardware information
func (*AdminClient) ServerUpdate ¶
func (adm *AdminClient) ServerUpdate(updateURL string) (us ServerUpdateStatus, err error)
ServerUpdate - updates and restarts the MinIO cluster to latest version. optionally takes an input URL to specify a custom update binary link
func (*AdminClient) ServiceRestart ¶
func (adm *AdminClient) ServiceRestart() error
ServiceRestart - restarts the MinIO cluster
func (*AdminClient) ServiceStop ¶
func (adm *AdminClient) ServiceStop() error
ServiceStop - stops the MinIO cluster
func (AdminClient) ServiceTrace ¶
func (adm AdminClient) ServiceTrace(allTrace, errTrace bool, doneCh <-chan struct{}) <-chan ServiceTraceInfo
ServiceTrace - listen on http trace notifications.
func (*AdminClient) SetAppInfo ¶
func (adm *AdminClient) SetAppInfo(appName string, appVersion string)
SetAppInfo - add application details to user agent.
func (*AdminClient) SetConfig ¶
func (adm *AdminClient) SetConfig(config io.Reader) (err error)
SetConfig - set config supplied as config.json for the setup.
func (*AdminClient) SetConfigKV ¶
func (adm *AdminClient) SetConfigKV(kv string) (err error)
SetConfigKV - set key value config to server.
func (*AdminClient) SetCustomTransport ¶
func (adm *AdminClient) SetCustomTransport(customHTTPTransport http.RoundTripper)
SetCustomTransport - set new custom transport.
func (*AdminClient) SetGroupStatus ¶
func (adm *AdminClient) SetGroupStatus(group string, status GroupStatus) error
SetGroupStatus - sets the status of a group.
func (*AdminClient) SetPolicy ¶
func (adm *AdminClient) SetPolicy(policyName, entityName string, isGroup bool) error
SetPolicy - sets the policy for a user or a group.
func (*AdminClient) SetUser ¶
func (adm *AdminClient) SetUser(accessKey, secretKey string, status AccountStatus) error
SetUser - sets a user info.
func (*AdminClient) SetUserStatus ¶
func (adm *AdminClient) SetUserStatus(accessKey string, status AccountStatus) error
SetUserStatus - adds a status for a user.
func (*AdminClient) StartProfiling ¶
func (adm *AdminClient) StartProfiling(profiler ProfilerType) ([]StartProfilingResult, error)
StartProfiling makes an admin call to remotely start profiling on a standalone server or the whole cluster in case of a distributed setup.
func (*AdminClient) StorageInfo ¶
func (adm *AdminClient) StorageInfo() (StorageInfo, error)
StorageInfo - Connect to a minio server and call Storage Info Management API to fetch server's information represented by StorageInfo structure
func (*AdminClient) TopLocks ¶
func (adm *AdminClient) TopLocks() (LockEntries, error)
TopLocks - returns the oldest locks in a minio setup.
func (*AdminClient) TraceOn ¶
func (adm *AdminClient) TraceOn(outputStream io.Writer)
TraceOn - enable HTTP tracing.
func (*AdminClient) UpdateGroupMembers ¶
func (adm *AdminClient) UpdateGroupMembers(g GroupAddRemove) error
UpdateGroupMembers - adds/removes users to/from a group. Server creates the group as needed. Group is removed if remove request is made on empty group.
type BackendDisks ¶
BackendDisks - represents the map of endpoint-disks.
func (BackendDisks) Merge ¶
func (d1 BackendDisks) Merge(d2 BackendDisks) BackendDisks
Merge - Reduces two endpoint-disk maps.
func (BackendDisks) Sum ¶
func (d1 BackendDisks) Sum() (sum int)
Sum - Return the sum of the disks in the endpoint-disk map.
type BackendType ¶
type BackendType int
BackendType - represents different backend types.
const ( Unknown BackendType = iota // Filesystem backend. FS // Multi disk Erasure (single, distributed) backend. Erasure )
Enum for different backend types.
type BgHealState ¶
BgHealState represents the status of the background heal
type ConfigHistoryEntry ¶
type ConfigHistoryEntry struct { RestoreID string `json:"restoreId"` CreateTime time.Time `json:"createTime"` Data string `json:"data"` }
ConfigHistoryEntry - captures config set history with a unique restore ID and createTime
func (ConfigHistoryEntry) CreateTimeFormatted ¶
func (ch ConfigHistoryEntry) CreateTimeFormatted() string
CreateTimeFormatted is used to print formatted time for CreateTime.
type DriveInfo ¶
type DriveInfo HealDriveInfo
DriveInfo - represents each drive info, describing status, uuid and endpoint.
type ErrorResponse ¶
type ErrorResponse struct { XMLName xml.Name `xml:"Error" json:"-"` Code string Message string BucketName string Key string RequestID string `xml:"RequestId"` HostID string `xml:"HostId"` // Region where the bucket is located. This header is returned // only in HEAD bucket and ListObjects response. Region string }
ErrorResponse - Is the typed error returned by all API operations.
func ToErrorResponse ¶
func ToErrorResponse(err error) ErrorResponse
ToErrorResponse - Returns parsed ErrorResponse struct from body and http headers.
For example:
import admin "github.com/minio/minio/pkg/madmin" ... ... ss, err := adm.ServiceStatus(...) if err != nil { resp := admin.ToErrorResponse(err) } ...
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
Error - Returns HTTP error string
type GroupAddRemove ¶
type GroupAddRemove struct { Group string `json:"group"` Members []string `json:"members"` IsRemove bool `json:"isRemove"` }
GroupAddRemove is type for adding/removing members to/from a group.
type GroupDesc ¶
type GroupDesc struct { Name string `json:"name"` Status string `json:"status"` Members []string `json:"members"` Policy string `json:"policy"` }
GroupDesc is a type that holds group info along with the policy attached to it.
type GroupStatus ¶
type GroupStatus string
GroupStatus - group status.
const ( GroupEnabled GroupStatus = "enabled" GroupDisabled GroupStatus = "disabled" )
GroupStatus values.
type HardwareType ¶
type HardwareType string
HardwareType - type to hardware
const ( // HARDWARE represents hardware type HARDWARE = "hwType" // CPU represents hardware as cpu CPU HardwareType = "cpu" // NETWORK hardware Info NETWORK HardwareType = "network" )
type HealDriveInfo ¶
type HealDriveInfo struct { UUID string `json:"uuid"` Endpoint string `json:"endpoint"` State string `json:"state"` }
HealDriveInfo - struct for an individual drive info item.
type HealItemType ¶
type HealItemType string
HealItemType - specify the type of heal operation in a healing result
type HealOpts ¶
type HealOpts struct { Recursive bool `json:"recursive"` DryRun bool `json:"dryRun"` Remove bool `json:"remove"` ScanMode HealScanMode `json:"scanMode"` }
HealOpts - collection of options for a heal sequence
type HealResultItem ¶
type HealResultItem struct { ResultIndex int64 `json:"resultId"` Type HealItemType `json:"type"` Bucket string `json:"bucket"` Object string `json:"object"` Detail string `json:"detail"` ParityBlocks int `json:"parityBlocks,omitempty"` DataBlocks int `json:"dataBlocks,omitempty"` DiskCount int `json:"diskCount"` SetCount int `json:"setCount"` // below slices are from drive info. Before struct { Drives []HealDriveInfo `json:"drives"` } `json:"before"` After struct { Drives []HealDriveInfo `json:"drives"` } `json:"after"` ObjectSize int64 `json:"objectSize"` }
HealResultItem - struct for an individual heal result item
func (*HealResultItem) GetCorruptedCounts ¶
func (hri *HealResultItem) GetCorruptedCounts() (b, a int)
GetCorruptedCounts - returns the number of corrupted disks before and after heal
func (*HealResultItem) GetMissingCounts ¶
func (hri *HealResultItem) GetMissingCounts() (b, a int)
GetMissingCounts - returns the number of missing disks before and after heal
func (*HealResultItem) GetOfflineCounts ¶
func (hri *HealResultItem) GetOfflineCounts() (b, a int)
GetOfflineCounts - returns the number of offline disks before and after heal
func (*HealResultItem) GetOnlineCounts ¶
func (hri *HealResultItem) GetOnlineCounts() (b, a int)
GetOnlineCounts - returns the number of online disks before and after heal
type HealScanMode ¶
type HealScanMode int
HealScanMode represents the type of healing scan
const ( // HealNormalScan checks if parts are present and not outdated HealNormalScan HealScanMode = iota // HealDeepScan checks for parts bitrot checksums HealDeepScan )
type HealStartSuccess ¶
type HealStartSuccess struct { ClientToken string `json:"clientToken"` ClientAddress string `json:"clientAddress"` StartTime time.Time `json:"startTime"` }
HealStartSuccess - holds information about a successfully started heal operation
type HealStopSuccess ¶
type HealStopSuccess HealStartSuccess
HealStopSuccess - holds information about a successfully stopped heal operation.
type HealTaskStatus ¶
type HealTaskStatus struct { Summary string `json:"summary"` FailureDetail string `json:"detail"` StartTime time.Time `json:"startTime"` HealSettings HealOpts `json:"settings"` NumDisks int `json:"numDisks"` Items []HealResultItem `json:"items,omitempty"` }
HealTaskStatus - status struct for a heal task
type KMSKeyStatus ¶
type KMSKeyStatus struct { KeyID string `json:"key-id"` EncryptionErr string `json:"encryption-error,omitempty"` // An empty error == success UpdateErr string `json:"update-error,omitempty"` // An empty error == success DecryptionErr string `json:"decryption-error,omitempty"` // An empty error == success }
KMSKeyStatus contains some status information about a KMS master key. The MinIO server tries to access the KMS and perform encryption and decryption operations. If the MinIO server can access the KMS and all master key operations succeed it returns a status containing only the master key ID but no error.
type LockEntries ¶
type LockEntries []LockEntry
LockEntries - To sort the locks
func (LockEntries) Len ¶
func (l LockEntries) Len() int
func (LockEntries) Less ¶
func (l LockEntries) Less(i, j int) bool
func (LockEntries) Swap ¶
func (l LockEntries) Swap(i, j int)
type LockEntry ¶
type LockEntry struct { Timestamp time.Time `json:"time"` // Timestamp set at the time of initialization. Resource string `json:"resource"` // Resource contains info like bucket, object etc Type string `json:"type"` // Bool whether write or read lock. Source string `json:"source"` // Source which created the lock ServerList []string `json:"serverlist"` // RPC path of servers issuing the lock. Owner string `json:"owner"` // RPC path of client claiming lock. ID string `json:"id"` // UID to uniquely identify request of client. }
LockEntry holds information about client requesting the lock, servers holding the lock, source on the client machine, ID, type(read or write) and time stamp.
type LogInfo ¶
type LogInfo struct { log.Entry ConsoleMsg string NodeName string `json:"node"` Err error `json:"-"` }
LogInfo holds console log messages
type NetPerfInfo ¶
type NetPerfInfo struct { Addr string `json:"addr"` ReadThroughput uint64 `json:"readThroughput"` Error string `json:"error,omitempty"` }
NetPerfInfo network performance information.
type ProfilerType ¶
type ProfilerType string
ProfilerType represents the profiler type passed to the profiler subsystem.
type ServerCPUHardwareInfo ¶
type ServerCPUHardwareInfo struct { Addr string `json:"addr"` Error string `json:"error,omitempty"` CPUInfo []cpu.InfoStat `json:"cpu"` }
ServerCPUHardwareInfo holds informantion about cpu hardware
type ServerCPULoadInfo ¶
type ServerCPULoadInfo struct { Addr string `json:"addr"` Error string `json:"error,omitempty"` Load []cpu.Load `json:"load"` HistoricLoad []cpu.Load `json:"historicLoad"` }
ServerCPULoadInfo holds information about address and cpu load of a single server node
type ServerConnStats ¶
type ServerConnStats struct { TotalInputBytes uint64 `json:"transferred"` TotalOutputBytes uint64 `json:"received"` }
ServerConnStats holds network information
type ServerDrivesPerfInfo ¶
type ServerDrivesPerfInfo struct { Addr string `json:"addr"` Error string `json:"error,omitempty"` Perf []disk.Performance `json:"perf"` Size int64 `json:"size,omitempty"` }
ServerDrivesPerfInfo holds informantion about address and write speed of all drives in a single server node
type ServerHTTPMethodStats ¶
type ServerHTTPMethodStats struct { Count uint64 `json:"count"` AvgDuration string `json:"avgDuration"` }
ServerHTTPMethodStats holds total number of HTTP operations from/to the server, including the average duration the call was spent.
type ServerHTTPStats ¶
type ServerHTTPStats struct { TotalHEADStats ServerHTTPMethodStats `json:"totalHEADs"` SuccessHEADStats ServerHTTPMethodStats `json:"successHEADs"` TotalGETStats ServerHTTPMethodStats `json:"totalGETs"` SuccessGETStats ServerHTTPMethodStats `json:"successGETs"` TotalPUTStats ServerHTTPMethodStats `json:"totalPUTs"` SuccessPUTStats ServerHTTPMethodStats `json:"successPUTs"` TotalPOSTStats ServerHTTPMethodStats `json:"totalPOSTs"` SuccessPOSTStats ServerHTTPMethodStats `json:"successPOSTs"` TotalDELETEStats ServerHTTPMethodStats `json:"totalDELETEs"` SuccessDELETEStats ServerHTTPMethodStats `json:"successDELETEs"` }
ServerHTTPStats holds all type of http operations performed to/from the server including their average execution time.
type ServerInfo ¶
type ServerInfo struct { Error string `json:"error"` Addr string `json:"addr"` Data *ServerInfoData `json:"data"` }
ServerInfo holds server information result of one node
type ServerInfoData ¶
type ServerInfoData struct { StorageInfo StorageInfo `json:"storage"` ConnStats ServerConnStats `json:"network"` HTTPStats ServerHTTPStats `json:"http"` Properties ServerProperties `json:"server"` }
ServerInfoData holds storage, connections and other information of a given server
type ServerMemUsageInfo ¶
type ServerMemUsageInfo struct { Addr string `json:"addr"` Error string `json:"error,omitempty"` Usage []mem.Usage `json:"usage"` HistoricUsage []mem.Usage `json:"historicUsage"` }
ServerMemUsageInfo holds information about address and memory utilization of a single server node
type ServerNetworkHardwareInfo ¶
type ServerNetworkHardwareInfo struct { Addr string `json:"addr"` Error string `json:"error,omitempty"` NetworkInfo []net.Interface `json:"network"` }
ServerNetworkHardwareInfo holds informantion about cpu hardware
type ServerProperties ¶
type ServerProperties struct { Uptime time.Duration `json:"uptime"` Version string `json:"version"` CommitID string `json:"commitID"` DeploymentID string `json:"deploymentID"` Region string `json:"region"` SQSARN []string `json:"sqsARN"` }
ServerProperties holds some of the server's information such as uptime, version, region, ..
type ServerUpdateStatus ¶
type ServerUpdateStatus struct { CurrentVersion string `json:"currentVersion"` UpdatedVersion string `json:"updatedVersion"` }
ServerUpdateStatus - contains the response of service update API
type ServiceAction ¶
type ServiceAction string
ServiceAction - type to restrict service-action values
const ( // ServiceActionRestart represents restart action ServiceActionRestart ServiceAction = "restart" // ServiceActionStop represents stop action ServiceActionStop = "stop" )
type ServiceTraceInfo ¶
ServiceTraceInfo holds http trace
type StartProfilingResult ¶
type StartProfilingResult struct { NodeName string `json:"nodeName"` Success bool `json:"success"` Error string `json:"error"` }
StartProfilingResult holds the result of starting profiler result in a given node.
type StorageInfo ¶
type StorageInfo struct { Used []uint64 // Used total used per disk. Total []uint64 // Total disk space per disk. Available []uint64 // Total disk space available per disk. MountPaths []string // Disk mountpoints // Backend type. Backend struct { // Represents various backend types, currently on FS and Erasure. Type BackendType // Following fields are only meaningful if BackendType is Erasure. OnlineDisks BackendDisks // Online disks during server startup. OfflineDisks BackendDisks // Offline disks during server startup. StandardSCData int // Data disks for currently configured Standard storage class. StandardSCParity int // Parity disks for currently configured Standard storage class. RRSCData int // Data disks for currently configured Reduced Redundancy storage class. RRSCParity int // Parity disks for currently configured Reduced Redundancy storage class. // List of all disk status, this is only meaningful if BackendType is Erasure. Sets [][]DriveInfo } }
StorageInfo - represents total capacity of underlying storage.
type Targets ¶
Targets sub-system targets
func ParseSubSysTarget ¶
ParseSubSysTarget - parse sub-system target
Source Files ¶
- api-error-response.go
- api-log.go
- api.go
- config-commands.go
- config-help-commands.go
- config-history-commands.go
- config-kv-commands.go
- encrypt.go
- group-commands.go
- hardware-commands.go
- heal-commands.go
- info-commands.go
- kms-commands.go
- parse-kv.go
- policy-commands.go
- profiling-commands.go
- retry.go
- service-commands.go
- top-commands.go
- update-commands.go
- user-commands.go
- utils.go