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
- func HasSpace(s string) bool
- func KvFields(input string, keys []string) []string
- func SanitizeValue(v string) string
- type ARN
- type AccountAccess
- type AccountInfo
- type AccountStatus
- type AddServiceAccountReq
- type AddServiceAccountResp
- type AdminClient
- func (adm *AdminClient) AccountInfo(ctx context.Context) (AccountInfo, error)
- func (adm *AdminClient) AddCannedPolicy(ctx context.Context, policyName string, policy *iampolicy.Policy) error
- func (adm *AdminClient) AddServiceAccount(ctx context.Context, opts AddServiceAccountReq) (auth.Credentials, error)
- func (adm *AdminClient) AddUser(ctx context.Context, accessKey, secretKey string) error
- func (adm *AdminClient) BackgroundHealStatus(ctx context.Context) (BgHealState, error)
- func (adm *AdminClient) ClearConfigHistoryKV(ctx context.Context, restoreID string) (err error)
- func (adm *AdminClient) CreateKey(ctx context.Context, keyID string) error
- func (adm *AdminClient) DataUsageInfo(ctx context.Context) (DataUsageInfo, error)
- func (adm *AdminClient) DelConfigKV(ctx context.Context, k string) (err error)
- func (adm *AdminClient) DeleteServiceAccount(ctx context.Context, serviceAccount string) error
- func (adm *AdminClient) DownloadProfilingData(ctx context.Context) (io.ReadCloser, error)
- func (adm *AdminClient) ForceUnlock(ctx context.Context, paths ...string) error
- func (adm *AdminClient) GetBucketBandwidth(ctx context.Context, buckets ...string) <-chan Report
- func (adm *AdminClient) GetBucketQuota(ctx context.Context, bucket string) (q BucketQuota, err error)
- func (adm *AdminClient) GetConfig(ctx context.Context) ([]byte, error)
- func (adm *AdminClient) GetConfigKV(ctx context.Context, key string) ([]byte, error)
- func (adm *AdminClient) GetGroupDescription(ctx context.Context, group string) (*GroupDesc, error)
- func (adm *AdminClient) GetKeyStatus(ctx context.Context, keyID string) (*KMSKeyStatus, error)
- func (adm AdminClient) GetLogs(ctx context.Context, node string, lineCnt int, logKind string) <-chan LogInfo
- func (adm *AdminClient) GetUserInfo(ctx context.Context, name string) (u UserInfo, err error)
- func (adm *AdminClient) Heal(ctx context.Context, bucket, prefix string, healOpts HealOpts, ...) (healStart HealStartSuccess, healTaskStatus HealTaskStatus, err error)
- func (adm *AdminClient) HelpConfigKV(ctx context.Context, subSys, key string, envOnly bool) (Help, error)
- func (adm *AdminClient) InfoCannedPolicy(ctx context.Context, policyName string) (*iampolicy.Policy, error)
- func (adm *AdminClient) InfoServiceAccount(ctx context.Context, accessKey string) (InfoServiceAccountResp, error)
- func (adm *AdminClient) ListCannedPolicies(ctx context.Context) (map[string]*iampolicy.Policy, error)
- func (adm *AdminClient) ListConfigHistoryKV(ctx context.Context, count int) ([]ConfigHistoryEntry, error)
- func (adm *AdminClient) ListGroups(ctx context.Context) ([]string, error)
- func (adm *AdminClient) ListRemoteTargets(ctx context.Context, bucket, arnType string) (targets []BucketTarget, err error)
- func (adm *AdminClient) ListServiceAccounts(ctx context.Context, user string) (ListServiceAccountsResp, error)
- func (adm *AdminClient) ListUsers(ctx context.Context) (map[string]UserInfo, error)
- func (adm *AdminClient) RemoveCannedPolicy(ctx context.Context, policyName string) error
- func (adm *AdminClient) RemoveRemoteTarget(ctx context.Context, bucket, arn string) error
- func (adm *AdminClient) RemoveUser(ctx context.Context, accessKey string) error
- func (adm *AdminClient) RestoreConfigHistoryKV(ctx context.Context, restoreID string) (err error)
- func (adm *AdminClient) ServerHealthInfo(ctx context.Context, healthDataTypes []HealthDataType, deadline time.Duration) <-chan HealthInfo
- func (adm *AdminClient) ServerInfo(ctx context.Context) (InfoMessage, error)
- func (adm *AdminClient) ServerUpdate(ctx context.Context, updateURL string) (us ServerUpdateStatus, err error)
- func (adm *AdminClient) ServiceRestart(ctx context.Context) error
- func (adm *AdminClient) ServiceStop(ctx context.Context) error
- func (adm AdminClient) ServiceTrace(ctx context.Context, opts ServiceTraceOpts) <-chan ServiceTraceInfo
- func (adm *AdminClient) SetAppInfo(appName string, appVersion string)
- func (adm *AdminClient) SetBucketQuota(ctx context.Context, bucket string, quota *BucketQuota) error
- func (adm *AdminClient) SetConfig(ctx context.Context, config io.Reader) (err error)
- func (adm *AdminClient) SetConfigKV(ctx context.Context, kv string) (restart bool, err error)
- func (adm *AdminClient) SetCustomTransport(customHTTPTransport http.RoundTripper)
- func (adm *AdminClient) SetGroupStatus(ctx context.Context, group string, status GroupStatus) error
- func (adm *AdminClient) SetPolicy(ctx context.Context, policyName, entityName string, isGroup bool) error
- func (adm *AdminClient) SetRemoteTarget(ctx context.Context, bucket string, target *BucketTarget) (string, error)
- func (adm *AdminClient) SetUser(ctx context.Context, accessKey, secretKey string, status AccountStatus) error
- func (adm *AdminClient) SetUserStatus(ctx context.Context, accessKey string, status AccountStatus) error
- func (adm *AdminClient) StartProfiling(ctx context.Context, profiler ProfilerType) ([]StartProfilingResult, error)
- func (adm *AdminClient) StorageInfo(ctx context.Context) (StorageInfo, error)
- func (adm *AdminClient) TopLocks(ctx context.Context) (LockEntries, error)
- func (adm *AdminClient) TopLocksWithOpts(ctx context.Context, opts TopLockOpts) (LockEntries, error)
- func (adm *AdminClient) TraceOff()
- func (adm *AdminClient) TraceOn(outputStream io.Writer)
- func (adm *AdminClient) UpdateGroupMembers(ctx context.Context, g GroupAddRemove) error
- func (adm *AdminClient) UpdateRemoteTarget(ctx context.Context, target *BucketTarget) (string, error)
- func (adm *AdminClient) UpdateServiceAccount(ctx context.Context, accessKey string, opts UpdateServiceAccountReq) error
- type Audit
- type BackendDisks
- type BackendInfo
- type BackendType
- type BgHealState
- type BucketAccessInfo
- type BucketQuota
- type BucketTarget
- type BucketTargets
- type BucketUsageInfo
- type Buckets
- type ConfigHistoryEntry
- type DataUsageInfo
- type Disk
- type DiskMetrics
- type DrivePerfInfo
- type ErasureBackend
- type ErrorResponse
- type FSBackend
- type GroupAddRemove
- type GroupDesc
- type GroupStatus
- type HealDriveInfo
- type HealItemType
- type HealOpts
- type HealResultItem
- type HealScanMode
- type HealStartSuccess
- type HealStopSuccess
- type HealTaskStatus
- type HealingDisk
- type HealthDataType
- type HealthInfo
- type Help
- type HelpKV
- type HelpKVS
- type InfoMessage
- type InfoServiceAccountResp
- type ItemState
- type KMS
- type KMSKeyStatus
- type KV
- type KVS
- type LDAP
- type ListServiceAccountsResp
- type LockEntries
- type LockEntry
- type LogInfo
- type Logger
- type MinioHealthInfo
- type NetPerfInfo
- type Objects
- type Options
- type PartitionStat
- type PerfInfo
- type ProfilerType
- type QuotaType
- type Report
- type ServerCPUInfo
- type ServerDiskHwInfo
- type ServerDrivesInfo
- type ServerMemInfo
- type ServerNetHealthInfo
- type ServerOsInfo
- type ServerProcInfo
- type ServerProperties
- type ServerUpdateStatus
- type ServiceAction
- type ServiceTraceInfo
- type ServiceTraceOpts
- type ServiceType
- type Services
- type SetStatus
- type StartProfilingResult
- type Status
- type StorageInfo
- type SysHealthInfo
- type SysProcess
- type Target
- type TargetIDStatus
- type TopLockOpts
- type UpdateServiceAccountReq
- type Usage
- type UserInfo
Constants ¶
const ( // ConfigAppliedHeader is the header indicating whether the config was applied without requiring a restart. ConfigAppliedHeader = "x-minio-config-applied" // ConfigAppliedTrue is the value set in header if the config was applied. ConfigAppliedTrue = "true" )
const ( HealItemMetadata HealItemType = "metadata" HealItemBucket = "bucket" HealItemBucketMetadata = "bucket-metadata" HealItemObject = "object" )
HealItemType constants
const ( DriveStateOk string = "ok" DriveStateOffline = "offline" DriveStateCorrupt = "corrupt" DriveStateMissing = "missing" DriveStatePermission = "permission-denied" DriveStateFaulty = "faulty" DriveStateUnknown = "unknown" DriveStateUnformatted = "unformatted" // only returned by disk )
Drive state constants
const ( // ItemOffline indicates that the item is offline ItemOffline = ItemState("offline") // ItemInitializing indicates that the item is still in initialization phase ItemInitializing = ItemState("initializing") // ItemOnline indicates that the item is online ItemOnline = ItemState("online") )
const ( // FsType - Backend is FS Type FsType = backendType("FS") // ErasureType - Backend is Erasure type ErasureType = backendType("Erasure") )
const ( EnableKey = "enable" CommentKey = "comment" // Enable values EnableOn = "on" EnableOff = "off" )
Standard config keys and values.
const ( SubSystemSeparator = `:` KvSeparator = `=` KvComment = `#` KvSpaceSeparator = ` ` KvNewline = "\n" KvDoubleQuote = `"` KvSingleQuote = `'` Default = `_` )
Constant separators
const ( AdminAPIVersion = "v3" AdminAPIVersionV2 = "v2" )
AdminAPIVersion - admin api version used in the request.
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 DefaultTransport = func(secure bool) http.RoundTripper { tr := &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ Timeout: 5 * time.Second, KeepAlive: 15 * time.Second, FallbackDelay: 100 * time.Millisecond, }).DialContext, MaxIdleConns: 1024, MaxIdleConnsPerHost: 1024, ResponseHeaderTimeout: 60 * time.Second, IdleConnTimeout: 60 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, DisableCompression: true, } if secure { tr.TLSClientConfig = &tls.Config{ MinVersion: tls.VersionTLS12, } } return tr }
DefaultTransport - this default transport is similar to http.DefaultTransport but with additional param DisableCompression is set to true to avoid decompressing content with 'gzip' encoding.
var ErrMaliciousData = sio.NotAuthentic
ErrMaliciousData indicates that the stream cannot be decrypted by provided credentials.
var HealthDataTypesList = []HealthDataType{ HealthDataTypePerfDrive, HealthDataTypePerfNet, HealthDataTypeMinioInfo, HealthDataTypeMinioConfig, HealthDataTypeSysCPU, HealthDataTypeSysDiskHw, HealthDataTypeSysDocker, HealthDataTypeSysOsInfo, HealthDataTypeSysLoad, HealthDataTypeSysMem, HealthDataTypeSysNet, HealthDataTypeSysProcess, }
HealthDataTypesList - List of Health datatypes
var HealthDataTypesMap = map[string]HealthDataType{ "perfdrive": HealthDataTypePerfDrive, "perfnet": HealthDataTypePerfNet, "minioinfo": HealthDataTypeMinioInfo, "minioconfig": HealthDataTypeMinioConfig, "syscpu": HealthDataTypeSysCPU, "sysdiskhw": HealthDataTypeSysDiskHw, "sysdocker": HealthDataTypeSysDocker, "sysosinfo": HealthDataTypeSysOsInfo, "sysload": HealthDataTypeSysLoad, "sysmem": HealthDataTypeSysMem, "sysnet": HealthDataTypeSysNet, "sysprocess": HealthDataTypeSysProcess, }
HealthDataTypesMap - Map of Health datatypes
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.
func KvFields ¶
KvFields - converts an input string of form "k1=v1 k2=v2" into fields of ["k1=v1", "k2=v2"], the tokenization of each `k=v` happens with the right number of input keys, if keys input is empty returned value is empty slice as well.
func SanitizeValue ¶
SanitizeValue - this function is needed, to trim off single or double quotes, creeping into the values.
Types ¶
type ARN ¶
type ARN struct { Type ServiceType ID string Region string Bucket string }
ARN is a struct to define arn.
type AccountAccess ¶
AccountAccess contains information about
type AccountInfo ¶
type AccountInfo struct { AccountName string Policy iampolicy.Policy Buckets []BucketAccessInfo }
AccountInfo represents the account usage info of an account across buckets.
type AccountStatus ¶
type AccountStatus string
AccountStatus - account status.
const ( AccountEnabled AccountStatus = "enabled" AccountDisabled AccountStatus = "disabled" )
Account status per user.
type AddServiceAccountReq ¶
type AddServiceAccountReq struct { Policy *iampolicy.Policy `json:"policy,omitempty"` TargetUser string `json:"targetUser,omitempty"` AccessKey string `json:"accessKey,omitempty"` SecretKey string `json:"secretKey,omitempty"` }
AddServiceAccountReq is the request options of the add service account admin call
type AddServiceAccountResp ¶
type AddServiceAccountResp struct {
Credentials auth.Credentials `json:"credentials"`
}
AddServiceAccountResp is the response body of the add service account admin call
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 admin client
func NewWithOptions ¶
func NewWithOptions(endpoint string, opts *Options) (*AdminClient, error)
NewWithOptions - instantiate minio admin client with options.
func (*AdminClient) AccountInfo ¶
func (adm *AdminClient) AccountInfo(ctx context.Context) (AccountInfo, error)
AccountInfo returns the usage info for the authenticating account.
func (*AdminClient) AddCannedPolicy ¶
func (adm *AdminClient) AddCannedPolicy(ctx context.Context, policyName string, policy *iampolicy.Policy) error
AddCannedPolicy - adds a policy for a canned.
func (*AdminClient) AddServiceAccount ¶
func (adm *AdminClient) AddServiceAccount(ctx context.Context, opts AddServiceAccountReq) (auth.Credentials, error)
AddServiceAccount - creates a new service account belonging to the user sending the request while restricting the service account permission by the given policy document.
func (*AdminClient) AddUser ¶
func (adm *AdminClient) AddUser(ctx context.Context, accessKey, secretKey string) error
AddUser - adds a user.
func (*AdminClient) BackgroundHealStatus ¶
func (adm *AdminClient) BackgroundHealStatus(ctx context.Context) (BgHealState, error)
BackgroundHealStatus returns the background heal status of the current server or cluster.
func (*AdminClient) ClearConfigHistoryKV ¶
func (adm *AdminClient) ClearConfigHistoryKV(ctx context.Context, 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) CreateKey ¶
func (adm *AdminClient) CreateKey(ctx context.Context, keyID string) error
CreateKey tries to create a new master key with the given keyID at the KMS connected to a MinIO server.
func (*AdminClient) DataUsageInfo ¶
func (adm *AdminClient) DataUsageInfo(ctx context.Context) (DataUsageInfo, error)
DataUsageInfo - returns data usage of the current object API
func (*AdminClient) DelConfigKV ¶
func (adm *AdminClient) DelConfigKV(ctx context.Context, k string) (err error)
DelConfigKV - delete key from server config.
func (*AdminClient) DeleteServiceAccount ¶
func (adm *AdminClient) DeleteServiceAccount(ctx context.Context, serviceAccount string) error
DeleteServiceAccount - delete a specified service account. The server will reject the request if the service account does not belong to the user initiating the request
func (*AdminClient) DownloadProfilingData ¶
func (adm *AdminClient) DownloadProfilingData(ctx context.Context) (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) ForceUnlock ¶
func (adm *AdminClient) ForceUnlock(ctx context.Context, paths ...string) error
ForceUnlock force unlocks input paths...
func (*AdminClient) GetBucketBandwidth ¶
func (adm *AdminClient) GetBucketBandwidth(ctx context.Context, buckets ...string) <-chan Report
GetBucketBandwidth - Gets a channel reporting bandwidth measurements for replication buckets. If no buckets generate replication traffic an empty map is returned in the report until traffic is seen.
func (*AdminClient) GetBucketQuota ¶
func (adm *AdminClient) GetBucketQuota(ctx context.Context, bucket string) (q BucketQuota, err error)
GetBucketQuota - get info on a user
func (*AdminClient) GetConfig ¶
func (adm *AdminClient) GetConfig(ctx context.Context) ([]byte, error)
GetConfig - returns the config.json of a minio setup, incoming data is encrypted.
func (*AdminClient) GetConfigKV ¶
GetConfigKV - returns the key, value of the requested key, incoming data is encrypted.
func (*AdminClient) GetGroupDescription ¶
GetGroupDescription - fetches information on a group.
func (*AdminClient) GetKeyStatus ¶
func (adm *AdminClient) GetKeyStatus(ctx context.Context, 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/v3/kms/key/status` API endpoint.
func (AdminClient) GetLogs ¶
func (adm AdminClient) GetLogs(ctx context.Context, node string, lineCnt int, logKind string) <-chan LogInfo
GetLogs - listen on console log messages.
func (*AdminClient) GetUserInfo ¶
GetUserInfo - get info on a user
func (*AdminClient) Heal ¶
func (adm *AdminClient) Heal(ctx context.Context, 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 ¶
func (adm *AdminClient) HelpConfigKV(ctx context.Context, subSys, key string, envOnly bool) (Help, error)
HelpConfigKV - return help for a given sub-system.
func (*AdminClient) InfoCannedPolicy ¶
func (adm *AdminClient) InfoCannedPolicy(ctx context.Context, policyName string) (*iampolicy.Policy, error)
InfoCannedPolicy - expand canned policy into JSON structure.
func (*AdminClient) InfoServiceAccount ¶
func (adm *AdminClient) InfoServiceAccount(ctx context.Context, accessKey string) (InfoServiceAccountResp, error)
InfoServiceAccount - returns the info of service account belonging to the specified user
func (*AdminClient) ListCannedPolicies ¶
func (adm *AdminClient) ListCannedPolicies(ctx context.Context) (map[string]*iampolicy.Policy, error)
ListCannedPolicies - list all configured canned policies.
func (*AdminClient) ListConfigHistoryKV ¶
func (adm *AdminClient) ListConfigHistoryKV(ctx context.Context, count int) ([]ConfigHistoryEntry, error)
ListConfigHistoryKV - lists a slice of ConfigHistoryEntries sorted by createTime.
func (*AdminClient) ListGroups ¶
func (adm *AdminClient) ListGroups(ctx context.Context) ([]string, error)
ListGroups - lists all groups names present on the server.
func (*AdminClient) ListRemoteTargets ¶
func (adm *AdminClient) ListRemoteTargets(ctx context.Context, bucket, arnType string) (targets []BucketTarget, err error)
ListRemoteTargets - gets target(s) for this bucket
func (*AdminClient) ListServiceAccounts ¶
func (adm *AdminClient) ListServiceAccounts(ctx context.Context, user string) (ListServiceAccountsResp, error)
ListServiceAccounts - list service accounts belonging to the specified user
func (*AdminClient) RemoveCannedPolicy ¶
func (adm *AdminClient) RemoveCannedPolicy(ctx context.Context, policyName string) error
RemoveCannedPolicy - remove a policy for a canned.
func (*AdminClient) RemoveRemoteTarget ¶
func (adm *AdminClient) RemoveRemoteTarget(ctx context.Context, bucket, arn string) error
RemoveRemoteTarget removes a remote target associated with particular ARN for this bucket
func (*AdminClient) RemoveUser ¶
func (adm *AdminClient) RemoveUser(ctx context.Context, accessKey string) error
RemoveUser - remove a user.
func (*AdminClient) RestoreConfigHistoryKV ¶
func (adm *AdminClient) RestoreConfigHistoryKV(ctx context.Context, restoreID string) (err error)
RestoreConfigHistoryKV - Restore a previous config set history. Input is a unique id which represents the previous setting.
func (*AdminClient) ServerHealthInfo ¶
func (adm *AdminClient) ServerHealthInfo(ctx context.Context, healthDataTypes []HealthDataType, deadline time.Duration) <-chan HealthInfo
ServerHealthInfo - Connect to a minio server and call Health Info Management API to fetch server's information represented by HealthInfo structure
func (*AdminClient) ServerInfo ¶
func (adm *AdminClient) ServerInfo(ctx context.Context) (InfoMessage, error)
ServerInfo - Connect to a minio server and call Server Admin Info Management API to fetch server's information represented by infoMessage structure
func (*AdminClient) ServerUpdate ¶
func (adm *AdminClient) ServerUpdate(ctx context.Context, 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(ctx context.Context) error
ServiceRestart - restarts the MinIO cluster
func (*AdminClient) ServiceStop ¶
func (adm *AdminClient) ServiceStop(ctx context.Context) error
ServiceStop - stops the MinIO cluster
func (AdminClient) ServiceTrace ¶
func (adm AdminClient) ServiceTrace(ctx context.Context, opts ServiceTraceOpts) <-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) SetBucketQuota ¶
func (adm *AdminClient) SetBucketQuota(ctx context.Context, bucket string, quota *BucketQuota) error
SetBucketQuota - sets a bucket's quota, if quota is set to '0' quota is disabled.
func (*AdminClient) SetConfigKV ¶
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(ctx context.Context, group string, status GroupStatus) error
SetGroupStatus - sets the status of a group.
func (*AdminClient) SetPolicy ¶
func (adm *AdminClient) SetPolicy(ctx context.Context, policyName, entityName string, isGroup bool) error
SetPolicy - sets the policy for a user or a group.
func (*AdminClient) SetRemoteTarget ¶
func (adm *AdminClient) SetRemoteTarget(ctx context.Context, bucket string, target *BucketTarget) (string, error)
SetRemoteTarget sets up a remote target for this bucket
func (*AdminClient) SetUser ¶
func (adm *AdminClient) SetUser(ctx context.Context, accessKey, secretKey string, status AccountStatus) error
SetUser - sets a user info.
func (*AdminClient) SetUserStatus ¶
func (adm *AdminClient) SetUserStatus(ctx context.Context, accessKey string, status AccountStatus) error
SetUserStatus - adds a status for a user.
func (*AdminClient) StartProfiling ¶
func (adm *AdminClient) StartProfiling(ctx context.Context, 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(ctx context.Context) (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(ctx context.Context) (LockEntries, error)
TopLocks - returns top '10' oldest locks currently active on the server.
func (*AdminClient) TopLocksWithOpts ¶
func (adm *AdminClient) TopLocksWithOpts(ctx context.Context, opts TopLockOpts) (LockEntries, error)
TopLocksWithOpts - returns the count number of oldest locks currently active on the server. additionally we can also enable `stale` to get stale locks currently present on server.
func (*AdminClient) TraceOn ¶
func (adm *AdminClient) TraceOn(outputStream io.Writer)
TraceOn - enable HTTP tracing.
func (*AdminClient) UpdateGroupMembers ¶
func (adm *AdminClient) UpdateGroupMembers(ctx context.Context, 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.
func (*AdminClient) UpdateRemoteTarget ¶
func (adm *AdminClient) UpdateRemoteTarget(ctx context.Context, target *BucketTarget) (string, error)
UpdateRemoteTarget updates credentials for a remote bucket target
func (*AdminClient) UpdateServiceAccount ¶
func (adm *AdminClient) UpdateServiceAccount(ctx context.Context, accessKey string, opts UpdateServiceAccountReq) error
UpdateServiceAccount - edit an existing service account
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 BackendInfo ¶
type BackendInfo struct { // Represents various backend types, currently on FS, Erasure and Gateway Type BackendType // Following fields are only meaningful if BackendType is Gateway. GatewayOnline bool // Following fields are only meaningful if BackendType is Erasure. OnlineDisks BackendDisks // Online disks during server startup. OfflineDisks BackendDisks // Offline disks during server startup. // Following fields are only meaningful if BackendType is Erasure. 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. }
BackendInfo - contains info of the underlying backend
type BackendType ¶
type BackendType int
BackendType - represents different backend types.
const ( Unknown BackendType = iota // Filesystem backend. FS // Multi disk Erasure (single, distributed) backend. Erasure // Gateway to other storage Gateway )
Enum for different backend types.
type BgHealState ¶
type BgHealState struct { ScannedItemsCount int64 HealDisks []string // SetStatus contains information for each set. Sets []SetStatus `json:"sets"` }
BgHealState represents the status of the background heal
type BucketAccessInfo ¶
type BucketAccessInfo struct { Name string `json:"name"` Size uint64 `json:"size"` Created time.Time `json:"created"` Access AccountAccess `json:"access"` }
BucketAccessInfo represents bucket usage of a bucket, and its relevant access type for an account
type BucketQuota ¶
BucketQuota holds bucket quota restrictions
func (BucketQuota) IsValid ¶
func (q BucketQuota) IsValid() bool
IsValid returns false if quota is invalid empty quota when Quota == 0 is always true.
type BucketTarget ¶
type BucketTarget struct { SourceBucket string `json:"sourcebucket"` Endpoint string `json:"endpoint"` Credentials *auth.Credentials `json:"credentials"` TargetBucket string `json:"targetbucket"` Secure bool `json:"secure"` Path string `json:"path,omitempty"` API string `json:"api,omitempty"` Arn string `json:"arn,omitempty"` Type ServiceType `json:"type"` Region string `json:"omitempty"` Label string `json:"label,omitempty"` BandwidthLimit int64 `json:"bandwidthlimit,omitempty"` ReplicationSync bool `json:"replicationSync"` HealthCheckDuration time.Duration `json:"healthCheckDuration,omitempty"` }
BucketTarget represents the target bucket and site association.
func (*BucketTarget) Clone ¶
func (t *BucketTarget) Clone() BucketTarget
Clone returns shallow clone of BucketTarget without secret key in credentials
func (BucketTarget) Empty ¶
func (t BucketTarget) Empty() bool
Empty returns true if struct is empty.
func (*BucketTarget) String ¶
func (t *BucketTarget) String() string
type BucketTargets ¶
type BucketTargets struct {
Targets []BucketTarget
}
BucketTargets represents a slice of bucket targets by type and endpoint
func (BucketTargets) Empty ¶
func (t BucketTargets) Empty() bool
Empty returns true if struct is empty.
type BucketUsageInfo ¶
type BucketUsageInfo struct { Size uint64 `json:"size"` ReplicationPendingSize uint64 `json:"objectsPendingReplicationTotalSize"` ReplicationFailedSize uint64 `json:"objectsFailedReplicationTotalSize"` ReplicatedSize uint64 `json:"objectsReplicatedTotalSize"` ReplicaSize uint64 `json:"objectReplicaTotalSize"` ReplicationPendingCount uint64 `json:"objectsPendingReplicationCount"` ReplicationFailedCount uint64 `json:"objectsFailedReplicationCount"` ObjectsCount uint64 `json:"objectsCount"` ObjectSizesHistogram map[string]uint64 `json:"objectsSizesHistogram"` }
BucketUsageInfo - bucket usage info provides - total size of the bucket - total objects in a bucket - object size histogram per bucket
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 DataUsageInfo ¶
type DataUsageInfo struct { // LastUpdate is the timestamp of when the data usage info was last updated. // This does not indicate a full scan. LastUpdate time.Time `json:"lastUpdate"` // Objects total count across all buckets ObjectsTotalCount uint64 `json:"objectsCount"` // Objects total size across all buckets ObjectsTotalSize uint64 `json:"objectsTotalSize"` // Total Size for objects that have not yet been replicated ReplicationPendingSize uint64 `json:"objectsPendingReplicationTotalSize"` // Total size for objects that have witness one or more failures and will be retried ReplicationFailedSize uint64 `json:"objectsFailedReplicationTotalSize"` // Total size for objects that have been replicated to destination ReplicatedSize uint64 `json:"objectsReplicatedTotalSize"` // Total size for objects that are replicas ReplicaSize uint64 `json:"objectsReplicaTotalSize"` // Total number of objects pending replication ReplicationPendingCount uint64 `json:"objectsPendingReplicationCount"` // Total number of objects that failed replication ReplicationFailedCount uint64 `json:"objectsFailedReplicationCount"` // Total number of buckets in this cluster BucketsCount uint64 `json:"bucketsCount"` // Buckets usage info provides following information across all buckets // - total size of the bucket // - total objects in a bucket // - object size histogram per bucket BucketsUsage map[string]BucketUsageInfo `json:"bucketsUsageInfo"` // Deprecated kept here for backward compatibility reasons. BucketSizes map[string]uint64 `json:"bucketsSizes"` }
DataUsageInfo represents data usage stats of the underlying Object API
type Disk ¶
type Disk struct { Endpoint string `json:"endpoint,omitempty"` RootDisk bool `json:"rootDisk,omitempty"` DrivePath string `json:"path,omitempty"` Healing bool `json:"healing,omitempty"` State string `json:"state,omitempty"` UUID string `json:"uuid,omitempty"` Model string `json:"model,omitempty"` TotalSpace uint64 `json:"totalspace,omitempty"` UsedSpace uint64 `json:"usedspace,omitempty"` AvailableSpace uint64 `json:"availspace,omitempty"` ReadThroughput float64 `json:"readthroughput,omitempty"` WriteThroughPut float64 `json:"writethroughput,omitempty"` ReadLatency float64 `json:"readlatency,omitempty"` WriteLatency float64 `json:"writelatency,omitempty"` Utilization float64 `json:"utilization,omitempty"` Metrics *DiskMetrics `json:"metrics,omitempty"` HealInfo *HealingDisk `json:"heal_info,omitempty"` // Indexes, will be -1 until assigned a set. PoolIndex int `json:"pool_index"` SetIndex int `json:"set_index"` DiskIndex int `json:"disk_index"` }
Disk holds Disk information
type DiskMetrics ¶
type DiskMetrics struct { APILatencies map[string]string `json:"apiLatencies,omitempty"` APICalls map[string]uint64 `json:"apiCalls,omitempty"` }
DiskMetrics has the information about XL Storage APIs the number of calls of each API and the moving average of the duration of each API.
type DrivePerfInfo ¶
type DrivePerfInfo struct { Path string `json:"endpoint"` Latency disk.Latency `json:"latency,omitempty"` Throughput disk.Throughput `json:"throughput,omitempty"` Error string `json:"error,omitempty"` }
DrivePerfInfo - Stats about a single drive in a MinIO node
type ErasureBackend ¶
type ErasureBackend struct { Type backendType `json:"backendType,omitempty"` OnlineDisks int `json:"onlineDisks,omitempty"` OfflineDisks int `json:"offlineDisks,omitempty"` // Parity disks for currently configured Standard storage class. StandardSCParity int `json:"standardSCParity,omitempty"` // Parity disks for currently configured Reduced Redundancy storage class. RRSCParity int `json:"rrSCParity,omitempty"` }
ErasureBackend contains specific erasure storage information
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 FSBackend ¶
type FSBackend struct {
Type backendType `json:"backendType,omitempty"`
}
FSBackend contains specific FS storage information
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 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"` Recreate bool `json:"recreate"` // only used when bucket needs to be healed 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"` VersionID string `json:"versionId"` 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 ( // HealUnknownScan default is unknown HealUnknownScan HealScanMode = iota // HealNormalScan checks if parts are present and not outdated HealNormalScan // 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"` Items []HealResultItem `json:"items,omitempty"` }
HealTaskStatus - status struct for a heal task
type HealingDisk ¶
type HealingDisk struct { ID string `json:"id"` PoolIndex int `json:"pool_index"` SetIndex int `json:"set_index"` DiskIndex int `json:"disk_index"` Endpoint string `json:"endpoint"` Path string `json:"path"` Started time.Time `json:"started"` LastUpdate time.Time `json:"last_update"` ObjectsHealed uint64 `json:"objects_healed"` ObjectsFailed uint64 `json:"objects_failed"` BytesDone uint64 `json:"bytes_done"` BytesFailed uint64 `json:"bytes_failed"` // Last object scanned. Bucket string `json:"current_bucket"` Object string `json:"current_object"` // Filled on startup/restarts. QueuedBuckets []string `json:"queued_buckets"` // Filled during heal. HealedBuckets []string `json:"healed_buckets"` }
HealingDisk contains information about
type HealthDataType ¶
type HealthDataType string
HealthDataType - Typed Health data types
const ( HealthDataTypePerfDrive HealthDataType = "perfdrive" HealthDataTypePerfNet HealthDataType = "perfnet" HealthDataTypeMinioInfo HealthDataType = "minioinfo" HealthDataTypeMinioConfig HealthDataType = "minioconfig" HealthDataTypeSysCPU HealthDataType = "syscpu" HealthDataTypeSysDiskHw HealthDataType = "sysdiskhw" HealthDataTypeSysDocker HealthDataType = "sysdocker" // is this really needed? HealthDataTypeSysOsInfo HealthDataType = "sysosinfo" HealthDataTypeSysLoad HealthDataType = "sysload" // provides very little info. Making it TBD HealthDataTypeSysMem HealthDataType = "sysmem" HealthDataTypeSysNet HealthDataType = "sysnet" HealthDataTypeSysProcess HealthDataType = "sysprocess" )
HealthDataTypes
type HealthInfo ¶
type HealthInfo struct { TimeStamp time.Time `json:"timestamp,omitempty"` Error string `json:"error,omitempty"` Perf PerfInfo `json:"perf,omitempty"` Minio MinioHealthInfo `json:"minio,omitempty"` Sys SysHealthInfo `json:"sys,omitempty"` }
HealthInfo - MinIO cluster's health Info
type Help ¶
type Help struct { SubSys string `json:"subSys"` Description string `json:"description"` MultipleTargets bool `json:"multipleTargets"` KeysHelp HelpKVS `json:"keysHelp"` }
Help - return sub-system level help
type HelpKV ¶
type HelpKV struct { Key string `json:"key"` Description string `json:"description"` Optional bool `json:"optional"` Type string `json:"type"` MultipleTargets bool `json:"multipleTargets"` }
HelpKV - implements help messages for keys with value as description of the keys.
type InfoMessage ¶
type InfoMessage struct { Mode string `json:"mode,omitempty"` Domain []string `json:"domain,omitempty"` Region string `json:"region,omitempty"` SQSARN []string `json:"sqsARN,omitempty"` DeploymentID string `json:"deploymentID,omitempty"` Buckets Buckets `json:"buckets,omitempty"` Objects Objects `json:"objects,omitempty"` Usage Usage `json:"usage,omitempty"` Services Services `json:"services,omitempty"` Backend interface{} `json:"backend,omitempty"` Servers []ServerProperties `json:"servers,omitempty"` }
InfoMessage container to hold server admin related information.
type InfoServiceAccountResp ¶
type InfoServiceAccountResp struct { ParentUser string `json:"parentUser"` AccountStatus string `json:"accountStatus"` ImpliedPolicy bool `json:"impliedPolicy"` Policy string `json:"policy"` }
InfoServiceAccountResp is the response body of the info service account call
type ItemState ¶
type ItemState string
ItemState - represents the status of any item in offline,init,online state
type KMS ¶
type KMS struct { Status string `json:"status,omitempty"` Encrypt string `json:"encrypt,omitempty"` Decrypt string `json:"decrypt,omitempty"` }
KMS contains KMS status information
type KMSKeyStatus ¶
type KMSKeyStatus struct { KeyID string `json:"key-id"` EncryptionErr string `json:"encryption-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 KVS ¶
type KVS []KV
KVS - is a shorthand for some wrapper functions to operate on list of key values.
type ListServiceAccountsResp ¶
type ListServiceAccountsResp struct {
Accounts []string `json:"accounts"`
}
ListServiceAccountsResp is the response body of the list service accounts call
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"` // When the lock was first granted Resource string `json:"resource"` // Resource contains info like bucket+object Type string `json:"type"` // Type indicates if 'Write' or 'Read' lock Source string `json:"source"` // Source at which lock was granted ServerList []string `json:"serverlist"` // List of servers participating in the lock. Owner string `json:"owner"` // Owner UUID indicates server owns the lock. ID string `json:"id"` // UID to uniquely identify request of client. // Represents quorum number of servers required to hold this lock, used to look for stale locks. Quorum int `json:"quorum"` }
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 { ConsoleMsg string NodeName string `json:"node"` Err error `json:"-"` // contains filtered or unexported fields }
LogInfo holds console log messages
type MinioHealthInfo ¶
type MinioHealthInfo struct { Info InfoMessage `json:"info,omitempty"` Config interface{} `json:"config,omitempty"` Error string `json:"error,omitempty"` }
MinioHealthInfo - Includes MinIO confifuration information
type NetPerfInfo ¶
type NetPerfInfo struct { Addr string `json:"remote"` Latency net.Latency `json:"latency,omitempty"` Throughput net.Throughput `json:"throughput,omitempty"` Error string `json:"error,omitempty"` }
NetPerfInfo - one-to-one network connectivity Stats between 2 MinIO nodes
type Options ¶
type Options struct { Creds *credentials.Credentials Secure bool }
Options for New method
type PartitionStat ¶
type PartitionStat struct { Device string `json:"device"` Mountpoint string `json:"mountpoint,omitempty"` Fstype string `json:"fstype,omitempty"` Opts string `json:"opts,omitempty"` SmartInfo smart.Info `json:"smartInfo,omitempty"` }
PartitionStat - includes data from both shirou/psutil.diskHw.PartitionStat as well as SMART data
type PerfInfo ¶
type PerfInfo struct { DriveInfo []ServerDrivesInfo `json:"drives,omitempty"` Net []ServerNetHealthInfo `json:"net,omitempty"` NetParallel ServerNetHealthInfo `json:"net_parallel,omitempty"` Error string `json:"error,omitempty"` }
PerfInfo - Includes Drive and Net perf info for the entire MinIO cluster
type ProfilerType ¶
type ProfilerType string
ProfilerType represents the profiler type passed to the profiler subsystem.
const ( ProfilerCPU ProfilerType = "cpu" // represents CPU profiler type ProfilerMEM ProfilerType = "mem" // represents MEM profiler type ProfilerBlock ProfilerType = "block" // represents Block profiler type ProfilerMutex ProfilerType = "mutex" // represents Mutex profiler type ProfilerTrace ProfilerType = "trace" // represents Trace profiler type ProfilerThreads ProfilerType = "threads" // represents ThreadCreate profiler type ProfilerGoroutines ProfilerType = "goroutines" // represents Goroutine dumps. )
Different supported profiler types.
type ServerCPUInfo ¶
type ServerCPUInfo struct { Addr string `json:"addr"` CPUStat []cpu.InfoStat `json:"cpu,omitempty"` TimeStat []cpu.TimesStat `json:"time,omitempty"` Error string `json:"error,omitempty"` }
ServerCPUInfo - Includes cpu and timer stats of each node of the MinIO cluster
type ServerDiskHwInfo ¶
type ServerDiskHwInfo struct { Addr string `json:"addr"` Usage []*diskhw.UsageStat `json:"usages,omitempty"` Partitions []PartitionStat `json:"partitions,omitempty"` Counters map[string]diskhw.IOCountersStat `json:"counters,omitempty"` Error string `json:"error,omitempty"` }
ServerDiskHwInfo - Includes usage counters, disk counters and partitions
func (*ServerDiskHwInfo) GetTotalCapacity ¶
func (s *ServerDiskHwInfo) GetTotalCapacity() (capacity uint64)
GetTotalCapacity gets the total capacity a server holds.
func (*ServerDiskHwInfo) GetTotalFreeCapacity ¶
func (s *ServerDiskHwInfo) GetTotalFreeCapacity() (capacity uint64)
GetTotalFreeCapacity gets the total capacity that is free.
func (*ServerDiskHwInfo) GetTotalUsedCapacity ¶
func (s *ServerDiskHwInfo) GetTotalUsedCapacity() (capacity uint64)
GetTotalUsedCapacity gets the total capacity used.
type ServerDrivesInfo ¶
type ServerDrivesInfo struct { Addr string `json:"addr"` Serial []DrivePerfInfo `json:"serial,omitempty"` // Drive perf info collected one drive at a time Parallel []DrivePerfInfo `json:"parallel,omitempty"` // Drive perf info collected in parallel Error string `json:"error,omitempty"` }
ServerDrivesInfo - Drive info about all drives in a single MinIO node
type ServerMemInfo ¶
type ServerMemInfo struct { Addr string `json:"addr"` SwapMem *mem.SwapMemoryStat `json:"swap,omitempty"` VirtualMem *mem.VirtualMemoryStat `json:"virtualmem,omitempty"` Error string `json:"error,omitempty"` }
ServerMemInfo - Includes host virtual and swap mem information
type ServerNetHealthInfo ¶
type ServerNetHealthInfo struct { Addr string `json:"addr"` Net []NetPerfInfo `json:"net,omitempty"` Error string `json:"error,omitempty"` }
ServerNetHealthInfo - Network health info about a single MinIO node
type ServerOsInfo ¶
type ServerOsInfo struct { Addr string `json:"addr"` Info *host.InfoStat `json:"info,omitempty"` Sensors []host.TemperatureStat `json:"sensors,omitempty"` Users []host.UserStat `json:"users,omitempty"` Error string `json:"error,omitempty"` }
ServerOsInfo - Includes host os information
type ServerProcInfo ¶
type ServerProcInfo struct { Addr string `json:"addr"` Processes []SysProcess `json:"processes,omitempty"` Error string `json:"error,omitempty"` }
ServerProcInfo - Includes host process lvl information
type ServerProperties ¶
type ServerProperties struct { State string `json:"state,omitempty"` Endpoint string `json:"endpoint,omitempty"` Uptime int64 `json:"uptime,omitempty"` Version string `json:"version,omitempty"` CommitID string `json:"commitID,omitempty"` Network map[string]string `json:"network,omitempty"` Disks []Disk `json:"drives,omitempty"` PoolNumber int `json:"poolNumber,omitempty"` MemStats runtime.MemStats `json:"mem_stats"` }
ServerProperties holds server information
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 ServiceTraceOpts ¶
type ServiceTraceOpts struct { All bool // Deprecated S3 bool Internal bool Storage bool OS bool OnlyErrors bool Threshold time.Duration }
ServiceTraceOpts holds tracing options
type ServiceType ¶
type ServiceType string
ServiceType represents service type
const ( // ReplicationService specifies replication service ReplicationService ServiceType = "replication" // ILMService specifies ilm service ILMService ServiceType = "ilm" )
func (ServiceType) IsValid ¶
func (t ServiceType) IsValid() bool
IsValid returns true if ARN type represents replication or ilm
type Services ¶
type Services struct { KMS KMS `json:"kms,omitempty"` LDAP LDAP `json:"ldap,omitempty"` Logger []Logger `json:"logger,omitempty"` Audit []Audit `json:"audit,omitempty"` Notifications []map[string][]TargetIDStatus `json:"notifications,omitempty"` }
Services contains different services information
type SetStatus ¶
type SetStatus struct { ID string `json:"id"` PoolIndex int `json:"pool_index"` SetIndex int `json:"set_index"` HealStatus string `json:"heal_status"` HealPriority string `json:"heal_priority"` Disks []Disk `json:"disks"` }
SetStatus contains information about the heal status of a set.
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 { Disks []Disk // Backend type. Backend BackendInfo }
StorageInfo - represents total capacity of underlying storage.
type SysHealthInfo ¶
type SysHealthInfo struct { CPUInfo []ServerCPUInfo `json:"cpus,omitempty"` DiskHwInfo []ServerDiskHwInfo `json:"drives,omitempty"` OsInfo []ServerOsInfo `json:"osinfos,omitempty"` MemInfo []ServerMemInfo `json:"meminfos,omitempty"` ProcInfo []ServerProcInfo `json:"procinfos,omitempty"` Error string `json:"error,omitempty"` }
SysHealthInfo - Includes hardware and system information of the MinIO cluster
type SysProcess ¶
type SysProcess struct { Pid int32 `json:"pid"` Background bool `json:"background,omitempty"` CPUPercent float64 `json:"cpupercent,omitempty"` Children []int32 `json:"children,omitempty"` CmdLine string `json:"cmd,omitempty"` ConnectionCount int `json:"connection_count,omitempty"` CreateTime int64 `json:"createtime,omitempty"` Cwd string `json:"cwd,omitempty"` Exe string `json:"exe,omitempty"` Gids []int32 `json:"gids,omitempty"` IOCounters *process.IOCountersStat `json:"iocounters,omitempty"` IsRunning bool `json:"isrunning,omitempty"` MemInfo *process.MemoryInfoStat `json:"meminfo,omitempty"` MemMaps *[]process.MemoryMapsStat `json:"memmaps,omitempty"` MemPercent float32 `json:"mempercent,omitempty"` Name string `json:"name,omitempty"` Nice int32 `json:"nice,omitempty"` NumCtxSwitches *process.NumCtxSwitchesStat `json:"numctxswitches,omitempty"` NumFds int32 `json:"numfds,omitempty"` NumThreads int32 `json:"numthreads,omitempty"` PageFaults *process.PageFaultsStat `json:"pagefaults,omitempty"` Parent int32 `json:"parent,omitempty"` Ppid int32 `json:"ppid,omitempty"` Status string `json:"status,omitempty"` Tgid int32 `json:"tgid,omitempty"` Times *cpu.TimesStat `json:"cputimes,omitempty"` Uids []int32 `json:"uids,omitempty"` Username string `json:"username,omitempty"` }
SysProcess - Includes process lvl information about a single process
type Target ¶
Target signifies an individual target
func ParseSubSysTarget ¶
ParseSubSysTarget - parse a sub-system target
type UpdateServiceAccountReq ¶
type UpdateServiceAccountReq struct { NewPolicy *iampolicy.Policy `json:"newPolicy,omitempty"` NewSecretKey string `json:"newSecretKey,omitempty"` NewStatus string `json:"newStatus,omityempty"` }
UpdateServiceAccountReq is the request options of the edit service account admin call
Source Files ¶
- api-error-response.go
- api-log-entry.go
- api-log.go
- api.go
- bandwidth.go
- config-commands.go
- config-help-commands.go
- config-history-commands.go
- config-kv-commands.go
- encrypt.go
- group-commands.go
- heal-commands.go
- health.go
- info-commands.go
- kms-commands.go
- parse-kv.go
- policy-commands.go
- profiling-commands.go
- quota-commands.go
- remote-target-commands.go
- retry.go
- service-commands.go
- top-commands.go
- transport.go
- update-commands.go
- user-commands.go
- utils.go