Documentation ¶
Index ¶
- Constants
- Variables
- func AzureEndpoint(endpoint string) func(az *TierAzure) error
- func AzurePrefix(prefix string) func(az *TierAzure) error
- func AzureRegion(region string) func(az *TierAzure) error
- func AzureStorageClass(sc string) func(az *TierAzure) error
- func DecryptData(password string, data io.Reader) ([]byte, error)
- func EncryptData(password string, data []byte) ([]byte, error)
- func ErrInvalidArgument(message string) error
- func FIPSEnabled() bool
- func GCSPrefix(prefix string) func(*TierGCS) error
- func GCSRegion(region string) func(*TierGCS) error
- func GCSStorageClass(sc string) func(*TierGCS) error
- func HasSpace(s string) bool
- func KvFields(input string, keys []string) []string
- func MinIOPrefix(prefix string) func(m *TierMinIO) error
- func MinIORegion(region string) func(m *TierMinIO) error
- func S3AWSRole() func(s3 *TierS3) error
- func S3Endpoint(endpoint string) func(s3 *TierS3) error
- func S3Prefix(prefix string) func(s3 *TierS3) error
- func S3Region(region string) func(s3 *TierS3) error
- func S3StorageClass(storageClass string) func(s3 *TierS3) error
- func SanitizeValue(v string) string
- type ARN
- type AccountAccess
- type AccountInfo
- type AccountOpts
- type AccountStatus
- type AddOrUpdateUserReq
- type AddServiceAccountReq
- type AddServiceAccountResp
- type AdminClient
- func (adm *AdminClient) AccountInfo(ctx context.Context, opts AccountOpts) (AccountInfo, error)
- func (adm *AdminClient) AddCannedPolicy(ctx context.Context, policyName string, policy []byte) error
- func (adm *AdminClient) AddServiceAccount(ctx context.Context, opts AddServiceAccountReq) (Credentials, error)
- func (adm *AdminClient) AddTier(ctx context.Context, cfg *TierConfig) error
- func (adm *AdminClient) AddUser(ctx context.Context, accessKey, secretKey string) error
- func (adm *AdminClient) BackgroundHealStatus(ctx context.Context) (BgHealState, error)
- func (adm *AdminClient) CancelDecommissionPool(ctx context.Context, pool string) 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) DecommissionPool(ctx context.Context, pool string) error
- func (adm *AdminClient) DelConfigKV(ctx context.Context, k string) (restart bool, 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) DriveSpeedtest(ctx context.Context, opts DriveSpeedTestOpts) (chan DriveSpeedTestResult, error)
- func (adm *AdminClient) EditTier(ctx context.Context, tierName string, creds TierCreds) error
- func (adm AdminClient) ExecuteMethod(ctx context.Context, method string, reqData RequestData) (res *http.Response, err error)
- func (adm *AdminClient) ForceUnlock(ctx context.Context, paths ...string) error
- func (adm AdminClient) GetAccessAndSecretKey() (string, string)
- 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) GetEndpointURL() *url.URL
- 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) GetUserDetail(ctx context.Context, name string) (u UserDetail, err error)
- 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) ([]byte, error)
- func (adm *AdminClient) InfoCannedPolicyV2(ctx context.Context, policyName string) (*PolicyInfo, error)
- func (adm *AdminClient) InfoServiceAccount(ctx context.Context, accessKey string) (InfoServiceAccountResp, error)
- func (adm *AdminClient) Inspect(ctx context.Context, d InspectOptions) (key [32]byte, c io.ReadCloser, err error)
- func (adm *AdminClient) KMSStatus(ctx context.Context) (KMSStatus, error)
- func (adm *AdminClient) ListCannedPolicies(ctx context.Context) (map[string]json.RawMessage, error)
- func (adm *AdminClient) ListConfigHistoryKV(ctx context.Context, count int) ([]ConfigHistoryEntry, error)
- func (adm *AdminClient) ListGroups(ctx context.Context) ([]string, error)
- func (adm *AdminClient) ListPoolsStatus(ctx context.Context) ([]PoolStatus, 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) ListTiers(ctx context.Context) ([]*TierConfig, error)
- func (adm *AdminClient) ListUsers(ctx context.Context) (map[string]UserInfo, error)
- func (adm *AdminClient) Netperf(ctx context.Context, duration time.Duration) (result NetperfResult, err error)
- func (adm *AdminClient) Profile(ctx context.Context, profiler ProfilerType, duration time.Duration) (io.ReadCloser, 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) RemoveTier(ctx context.Context, tierName 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) SRMetaInfo(ctx context.Context, opts SRStatusOptions) (info SRInfo, err error)
- func (adm *AdminClient) SRPeerBucketOps(ctx context.Context, bucket string, op BktOp, opts map[string]string) error
- func (adm *AdminClient) SRPeerEdit(ctx context.Context, pi PeerInfo) error
- func (adm *AdminClient) SRPeerGetIDPSettings(ctx context.Context) (info IDPSettings, err error)
- func (adm *AdminClient) SRPeerJoin(ctx context.Context, r SRPeerJoinReq) error
- func (adm *AdminClient) SRPeerRemove(ctx context.Context, removeReq SRRemoveReq) (st ReplicateRemoveStatus, err error)
- func (adm *AdminClient) SRPeerReplicateBucketMeta(ctx context.Context, item SRBucketMeta) error
- func (adm *AdminClient) SRPeerReplicateIAMItem(ctx context.Context, item SRIAMItem) error
- func (adm *AdminClient) SRStatusInfo(ctx context.Context, opts SRStatusOptions) (info SRStatusInfo, err error)
- func (adm *AdminClient) ServerHealthInfo(ctx context.Context, types []HealthDataType, deadline time.Duration) (*http.Response, string, error)
- 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) ServiceFreeze(ctx context.Context) 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) ServiceUnfreeze(ctx context.Context) error
- 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) SiteReplicationAdd(ctx context.Context, sites []PeerSite) (ReplicateAddStatus, error)
- func (adm *AdminClient) SiteReplicationEdit(ctx context.Context, site PeerInfo) (ReplicateEditStatus, error)
- func (adm *AdminClient) SiteReplicationInfo(ctx context.Context) (info SiteReplicationInfo, err error)
- func (adm *AdminClient) SiteReplicationRemove(ctx context.Context, removeReq SRRemoveReq) (st ReplicateRemoveStatus, err error)
- func (adm *AdminClient) Speedtest(ctx context.Context, opts SpeedtestOpts) (chan SpeedTestResult, error)
- func (adm *AdminClient) StartProfiling(ctx context.Context, profiler ProfilerType) ([]StartProfilingResult, error)
- func (adm *AdminClient) StatusPool(ctx context.Context, pool string) (PoolStatus, error)
- func (adm *AdminClient) StorageInfo(ctx context.Context) (StorageInfo, error)
- func (adm *AdminClient) TierStats(ctx context.Context) ([]TierInfo, 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, ops ...TargetUpdateType) (string, error)
- func (adm *AdminClient) UpdateServiceAccount(ctx context.Context, accessKey string, opts UpdateServiceAccountReq) error
- func (adm *AdminClient) VerifyTier(ctx context.Context, tierName string) error
- type Audit
- type AzureOptions
- type BackendDisks
- type BackendInfo
- type BackendType
- type BandwidthDetails
- type BgHealState
- type BktOp
- type BucketAccessInfo
- type BucketBandwidthReport
- type BucketDetails
- type BucketQuota
- type BucketTarget
- type BucketTargets
- type BucketUsageInfo
- type Buckets
- type CPU
- type CPUs
- type ConfigHistoryEntry
- type Credentials
- type DailyTierStats
- type DataUsageInfo
- type Disk
- type DiskLatency
- type DiskMetrics
- type DiskThroughput
- type DrivePerf
- type DrivePerfInfo
- type DrivePerfInfoV0
- type DrivePerfInfos
- type DriveSpeedTestOpts
- type DriveSpeedTestResult
- type ErasureBackend
- type ErrorResponse
- type FSBackend
- type GCSOptions
- type GCStats
- 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 HealthInfoV0
- type HealthInfoV2
- type HealthInfoVersionStruct
- type Help
- type HelpKV
- type HelpKVS
- type IDPSettings
- type InfoMessage
- type InfoServiceAccountResp
- type InspectOptions
- type ItemState
- type KMS
- type KMSKeyStatus
- type KMSStatus
- type KV
- type KVS
- type KubernetesInfo
- type LDAP
- type LDAPSettings
- type Latency
- type ListServiceAccountsResp
- type LockEntries
- type LockEntry
- type LogInfo
- type Logger
- type MRFStatus
- type MemInfo
- type MemStats
- type MinIOOptions
- type MinioConfig
- type MinioHealthInfo
- type MinioHealthInfoV0
- type MinioInfo
- type NetLatency
- type NetPerfInfo
- type NetPerfInfoV0
- type NetThroughput
- type NetperfNodeResult
- type NetperfResult
- type NodeCommon
- type NodeInfo
- type OSInfo
- type Objects
- type OpenIDProviderSettings
- type OpenIDSettings
- type Options
- type Partition
- type PartitionStat
- type Partitions
- type PeerInfo
- type PeerNetPerfInfo
- type PeerSite
- type PerfInfo
- type PerfInfoV0
- type PolicyInfo
- type PoolDecommissionInfo
- type PoolStatus
- type ProcInfo
- type ProfilerType
- type QuotaType
- type ReplicateAddStatus
- type ReplicateEditStatus
- type ReplicateRemoveStatus
- type Report
- type RequestData
- type S3Options
- type SRBucketInfo
- type SRBucketMeta
- type SRBucketStatsSummary
- type SREntityType
- type SRGroupInfo
- type SRGroupStatsSummary
- type SRIAMItem
- type SRIAMPolicy
- type SRIAMUser
- type SRInfo
- type SRPeerJoinReq
- type SRPolicyMapping
- type SRPolicyStatsSummary
- type SRRemoveReq
- type SRSTSCredential
- type SRSiteSummary
- type SRStatusInfo
- type SRStatusOptions
- type SRSvcAccChange
- type SRSvcAccCreate
- type SRSvcAccDelete
- type SRSvcAccUpdate
- type SRUserStatsSummary
- type ServerCPUInfo
- type ServerDiskHwInfo
- type ServerDrivesInfo
- type ServerInfo
- 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 SiteReplicationInfo
- type SmartAtaInfo
- type SmartInfo
- type SmartNvmeInfo
- type SmartScsiInfo
- type SpeedTestResult
- type SpeedTestResults
- type SpeedTestStatServer
- type SpeedTestStats
- type SpeedtestOpts
- type StartProfilingResult
- type Status
- type StorageInfo
- type SysConfig
- type SysErrors
- type SysHealthInfo
- type SysInfo
- type SysProcess
- type SysService
- type SysServices
- type TLSCert
- type TLSInfo
- type Target
- type TargetIDStatus
- type TargetUpdateType
- type Throughput
- type TierAzure
- type TierConfig
- func NewTierAzure(name, accountName, accountKey, bucket string, options ...AzureOptions) (*TierConfig, error)
- func NewTierGCS(name string, credsJSON []byte, bucket string, options ...GCSOptions) (*TierConfig, error)
- func NewTierMinIO(name, endpoint, accessKey, secretKey, bucket string, options ...MinIOOptions) (*TierConfig, error)
- func NewTierS3(name, accessKey, secretKey, bucket string, options ...S3Options) (*TierConfig, error)
- func (cfg *TierConfig) Bucket() string
- func (cfg *TierConfig) Clone() TierConfig
- func (z *TierConfig) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *TierConfig) EncodeMsg(en *msgp.Writer) (err error)
- func (cfg *TierConfig) Endpoint() string
- func (z *TierConfig) MarshalMsg(b []byte) (o []byte, err error)
- func (z *TierConfig) Msgsize() (s int)
- func (cfg *TierConfig) Prefix() string
- func (cfg *TierConfig) Region() string
- func (cfg *TierConfig) UnmarshalJSON(b []byte) error
- func (z *TierConfig) UnmarshalMsg(bts []byte) (o []byte, err error)
- type TierCreds
- type TierGCS
- func (z *TierGCS) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *TierGCS) EncodeMsg(en *msgp.Writer) (err error)
- func (gcs *TierGCS) GetCredentialJSON() ([]byte, error)
- func (z *TierGCS) MarshalMsg(b []byte) (o []byte, err error)
- func (z *TierGCS) Msgsize() (s int)
- func (z *TierGCS) UnmarshalMsg(bts []byte) (o []byte, err error)
- type TierInfo
- type TierMinIO
- type TierS3
- type TierStats
- type TierType
- func (z *TierType) DecodeMsg(dc *msgp.Reader) (err error)
- func (z TierType) EncodeMsg(en *msgp.Writer) (err error)
- func (tt TierType) MarshalJSON() ([]byte, error)
- func (z TierType) MarshalMsg(b []byte) (o []byte, err error)
- func (z TierType) Msgsize() (s int)
- func (tt TierType) String() string
- func (tt *TierType) UnmarshalJSON(data []byte) error
- func (z *TierType) UnmarshalMsg(bts []byte) (o []byte, err error)
- type TimeInfo
- type TopLockOpts
- type TraceCallStats
- type TraceInfo
- type TraceOSStats
- type TraceRequestInfo
- type TraceResponseInfo
- type TraceStorageStats
- type TraceType
- type UpdateServiceAccountReq
- type Usage
- type UserDetail
- type UserInfo
- type Versions
Examples ¶
Constants ¶
const ( ReplicateAddStatusSuccess = "Requested sites were configured for replication successfully." ReplicateAddStatusPartial = "Some sites could not be configured for replication." )
Meaningful values for ReplicateAddStatus.Status
const ( SRIAMItemPolicy = "policy" SRIAMItemSvcAcc = "service-account" SRIAMItemSTSAcc = "sts-account" SRIAMItemPolicyMapping = "policy-mapping" SRIAMItemIAMUser = "iam-user" SRIAMItemGroupInfo = "group-info" )
SRIAMItem.Type constants.
const ( SRBucketMetaTypePolicy = "policy" SRBucketMetaTypeTags = "tags" SRBucketMetaTypeVersionConfig = "version-config" SRBucketMetaTypeObjectLockConfig = "object-lock-config" SRBucketMetaTypeSSEConfig = "sse-config" SRBucketMetaTypeQuotaConfig = "quota-config" )
SRBucketMeta.Type constants
const ( ReplicateRemoveStatusSuccess = "Requested site(s) were removed from cluster replication successfully." ReplicateRemoveStatusPartial = "Some site(s) could not be removed from cluster replication configuration." )
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 ( // HealthInfoVersion0 is version 0 HealthInfoVersion0 = "" // HealthInfoVersion1 is version 1 HealthInfoVersion1 = "1" // HealthInfoVersion2 is version 2 HealthInfoVersion2 = "2" // HealthInfoVersion3 is version 3 HealthInfoVersion3 = "3" // HealthInfoVersion is current health info version. HealthInfoVersion = HealthInfoVersion3 )
const ( SysErrAuditEnabled = "audit is enabled" SysErrUpdatedbInstalled = "updatedb is installed" )
const ( SrvSELinux = "selinux" SrvNotInstalled = "not-installed" )
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 ( // ServiceActionRestart represents restart action ServiceActionRestart ServiceAction = "restart" // ServiceActionStop represents stop action ServiceActionStop = "stop" // ServiceActionFreeze represents freeze action ServiceActionFreeze = "freeze" // ServiceActionUnfreeze represents unfreeze a previous freeze action ServiceActionUnfreeze = "unfreeze" )
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
const TierConfigVer = "v1"
TierConfigVer refers to the current tier config version
Variables ¶
var ( // ErrTierNameEmpty "remote tier name empty" ErrTierNameEmpty = errors.New("remote tier name empty") // ErrTierInvalidConfig "invalid tier config" ErrTierInvalidConfig = errors.New("invalid tier config") // ErrTierInvalidConfigVersion "invalid tier config version" ErrTierInvalidConfigVersion = errors.New("invalid tier config version") // ErrTierTypeUnsupported "unsupported tier type" ErrTierTypeUnsupported = errors.New("unsupported tier type") )
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{ HealthDataTypeMinioInfo, HealthDataTypeMinioConfig, HealthDataTypeSysCPU, HealthDataTypeSysDriveHw, HealthDataTypeSysDocker, HealthDataTypeSysOsInfo, HealthDataTypeSysLoad, HealthDataTypeSysMem, HealthDataTypeSysNet, HealthDataTypeSysProcess, HealthDataTypeSysErrors, HealthDataTypeSysServices, HealthDataTypeSysConfig, HealthDataTypePerfDrive, HealthDataTypePerfObj, HealthDataTypePerfNet, }
HealthDataTypesList - List of health datatypes
var HealthDataTypesMap = map[string]HealthDataType{ "driveperf": HealthDataTypePerfDrive, "netperf": HealthDataTypePerfNet, "objperf": HealthDataTypePerfObj, "minioinfo": HealthDataTypeMinioInfo, "minioconfig": HealthDataTypeMinioConfig, "syscpu": HealthDataTypeSysCPU, "sysdrivehw": HealthDataTypeSysDriveHw, "sysdocker": HealthDataTypeSysDocker, "sysosinfo": HealthDataTypeSysOsInfo, "sysload": HealthDataTypeSysLoad, "sysmem": HealthDataTypeSysMem, "sysnet": HealthDataTypeSysNet, "sysprocess": HealthDataTypeSysProcess, "syserrors": HealthDataTypeSysErrors, "sysservices": HealthDataTypeSysServices, "sysconfig": HealthDataTypeSysConfig, }
HealthDataTypesMap - Map of Health datatypes
var MaxRetry = 10
MaxRetry is the maximum number of retries before stopping.
Functions ¶
func AzureEndpoint ¶
AzureEndpoint helper to supply optional endpoint to NewTierAzure
func AzurePrefix ¶
AzurePrefix helper to supply optional object prefix to NewTierAzure
func AzureRegion ¶
AzureRegion helper to supply optional region to NewTierAzure
func AzureStorageClass ¶
AzureStorageClass helper to supply optional storage class to NewTierAzure
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 FIPSEnabled ¶
func FIPSEnabled() bool
FIPSEnabled returns true if and only if FIPS 140-2 support is enabled.
FIPS 140-2 requires that only specifc cryptographic primitives, like AES or SHA-256, are used and that those primitives are implemented by a FIPS 140-2 certified cryptographic module.
func GCSStorageClass ¶
GCSStorageClass helper to supply optional storage class to NewTierGCS
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 MinIOPrefix ¶
MinIOPrefix helper to supply optional object prefix to NewTierMinIO
func MinIORegion ¶
MinIORegion helper to supply optional region to NewTierMinIO
func S3Endpoint ¶
S3Endpoint helper to supply optional endpoint to NewTierS3
func S3StorageClass ¶
S3StorageClass helper to supply optional storage class to NewTierS3
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 Server BackendInfo Policy json.RawMessage // Use iam/policy.Parse to parse the result, to be done by the caller. Buckets []BucketAccessInfo }
AccountInfo represents the account usage info of an account across buckets.
type AccountOpts ¶
type AccountOpts struct {
PrefixUsage bool
}
AccountOpts allows for configurable behavior with "prefix-usage"
type AccountStatus ¶
type AccountStatus string
AccountStatus - account status.
const ( AccountEnabled AccountStatus = "enabled" AccountDisabled AccountStatus = "disabled" )
Account status per user.
type AddOrUpdateUserReq ¶
type AddOrUpdateUserReq struct { SecretKey string `json:"secretKey,omitempty"` Status AccountStatus `json:"status"` }
AddOrUpdateUserReq allows to update user details such as secret key and account status.
type AddServiceAccountReq ¶
type AddServiceAccountReq struct { Policy json.RawMessage `json:"policy,omitempty"` // Parsed value from iam/policy.Parse() 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 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, opts AccountOpts) (AccountInfo, error)
AccountInfo returns the usage info for the authenticating account.
func (*AdminClient) AddCannedPolicy ¶
func (adm *AdminClient) AddCannedPolicy(ctx context.Context, policyName string, policy []byte) error
AddCannedPolicy - adds a policy for a canned.
func (*AdminClient) AddServiceAccount ¶
func (adm *AdminClient) AddServiceAccount(ctx context.Context, opts AddServiceAccountReq) (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) AddTier ¶
func (adm *AdminClient) AddTier(ctx context.Context, cfg *TierConfig) error
AddTier adds a new remote tier.
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) CancelDecommissionPool ¶
func (adm *AdminClient) CancelDecommissionPool(ctx context.Context, pool string) error
CancelDecommissionPool - cancels an on-going decommissioning process, this automatically makes the pool available for writing once canceled.
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) DecommissionPool ¶
func (adm *AdminClient) DecommissionPool(ctx context.Context, pool string) error
DecommissionPool - starts moving data from specified pool to all other existing pools. Decommissioning if successfully started this function will return `nil`, to check for on-going draining cycle use StatusPool.
func (*AdminClient) DelConfigKV ¶
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. Deprecated: use Profile API instead
func (*AdminClient) DriveSpeedtest ¶
func (adm *AdminClient) DriveSpeedtest(ctx context.Context, opts DriveSpeedTestOpts) (chan DriveSpeedTestResult, error)
DriveSpeedtest - perform drive speedtest on the MinIO servers
func (*AdminClient) EditTier ¶
EditTier supports updating credentials for the remote tier identified by tierName.
func (AdminClient) ExecuteMethod ¶
func (adm AdminClient) ExecuteMethod(ctx context.Context, method string, reqData RequestData) (res *http.Response, err error)
ExecuteMethod - similar to internal method executeMethod() useful for writing custom requests.
func (*AdminClient) ForceUnlock ¶
func (adm *AdminClient) ForceUnlock(ctx context.Context, paths ...string) error
ForceUnlock force unlocks input paths...
func (AdminClient) GetAccessAndSecretKey ¶
func (adm AdminClient) GetAccessAndSecretKey() (string, string)
GetAccessAndSecretKey - retrieves the access and secret keys.
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) GetEndpointURL ¶
func (adm AdminClient) GetEndpointURL() *url.URL
GetEndpointURL - returns the endpoint for the admin client.
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) GetUserDetail ¶
func (adm *AdminClient) GetUserDetail(ctx context.Context, name string) (u UserDetail, err error)
GetUserDetail - get detail info on a user
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 ¶
InfoCannedPolicy - expand canned policy into JSON structure.
To be DEPRECATED in favor of the implementation in InfoCannedPolicyV2
func (*AdminClient) InfoCannedPolicyV2 ¶
func (adm *AdminClient) InfoCannedPolicyV2(ctx context.Context, policyName string) (*PolicyInfo, error)
InfoCannedPolicyV2 - get info on a policy including timestamps and policy json.
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) Inspect ¶
func (adm *AdminClient) Inspect(ctx context.Context, d InspectOptions) (key [32]byte, c io.ReadCloser, err error)
Inspect makes an admin call to download a raw files from disk.
func (*AdminClient) KMSStatus ¶
func (adm *AdminClient) KMSStatus(ctx context.Context) (KMSStatus, error)
KMSStatus returns status information about the KMS connected to the MinIO server, if configured.
func (*AdminClient) ListCannedPolicies ¶
func (adm *AdminClient) ListCannedPolicies(ctx context.Context) (map[string]json.RawMessage, 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) ListPoolsStatus ¶
func (adm *AdminClient) ListPoolsStatus(ctx context.Context) ([]PoolStatus, error)
ListPoolsStatus returns list of pools currently configured and being used on the cluster.
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) ListTiers ¶
func (adm *AdminClient) ListTiers(ctx context.Context) ([]*TierConfig, error)
ListTiers returns a list of remote tiers configured.
func (*AdminClient) Netperf ¶
func (adm *AdminClient) Netperf(ctx context.Context, duration time.Duration) (result NetperfResult, err error)
Netperf - perform netperf on the MinIO servers
func (*AdminClient) Profile ¶
func (adm *AdminClient) Profile(ctx context.Context, profiler ProfilerType, duration time.Duration) (io.ReadCloser, error)
Profile makes an admin call to remotely start profiling on a standalone server or the whole cluster in case of a distributed setup for a specified duration.
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) RemoveTier ¶
func (adm *AdminClient) RemoveTier(ctx context.Context, tierName string) error
RemoveTier removes an empty tier identified by tierName
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) SRMetaInfo ¶
func (adm *AdminClient) SRMetaInfo(ctx context.Context, opts SRStatusOptions) (info SRInfo, err error)
SRMetaInfo - returns replication metadata info for a site.
func (*AdminClient) SRPeerBucketOps ¶
func (adm *AdminClient) SRPeerBucketOps(ctx context.Context, bucket string, op BktOp, opts map[string]string) error
SRPeerBucketOps - tells peers to create bucket and setup replication.
func (*AdminClient) SRPeerEdit ¶
func (adm *AdminClient) SRPeerEdit(ctx context.Context, pi PeerInfo) error
SRPeerEdit - used only by minio server to update peer endpoint for a server already in the site replication setup
func (*AdminClient) SRPeerGetIDPSettings ¶
func (adm *AdminClient) SRPeerGetIDPSettings(ctx context.Context) (info IDPSettings, err error)
SRPeerGetIDPSettings - fetches IDP settings from the server.
func (*AdminClient) SRPeerJoin ¶
func (adm *AdminClient) SRPeerJoin(ctx context.Context, r SRPeerJoinReq) error
SRPeerJoin - used only by minio server to send SR join requests to peer servers.
func (*AdminClient) SRPeerRemove ¶
func (adm *AdminClient) SRPeerRemove(ctx context.Context, removeReq SRRemoveReq) (st ReplicateRemoveStatus, err error)
SRPeerRemove - used only by minio server to unlink cluster replication for a server already in the site replication setup
func (*AdminClient) SRPeerReplicateBucketMeta ¶
func (adm *AdminClient) SRPeerReplicateBucketMeta(ctx context.Context, item SRBucketMeta) error
SRPeerReplicateBucketMeta - copies a bucket metadata change to a peer cluster.
func (*AdminClient) SRPeerReplicateIAMItem ¶
func (adm *AdminClient) SRPeerReplicateIAMItem(ctx context.Context, item SRIAMItem) error
SRPeerReplicateIAMItem - copies an IAM object to a peer cluster.
func (*AdminClient) SRStatusInfo ¶
func (adm *AdminClient) SRStatusInfo(ctx context.Context, opts SRStatusOptions) (info SRStatusInfo, err error)
SRStatusInfo - returns site replication status
func (*AdminClient) ServerHealthInfo ¶
func (adm *AdminClient) ServerHealthInfo(ctx context.Context, types []HealthDataType, deadline time.Duration) (*http.Response, string, error)
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) ServiceFreeze ¶
func (adm *AdminClient) ServiceFreeze(ctx context.Context) error
ServiceFreeze - freezes all incoming S3 API calls on MinIO cluster
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) ServiceUnfreeze ¶
func (adm *AdminClient) ServiceUnfreeze(ctx context.Context) error
ServiceUnfreeze - un-freezes all incoming S3 API calls on MinIO cluster
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 - update user secret key or account status.
func (*AdminClient) SetUserStatus ¶
func (adm *AdminClient) SetUserStatus(ctx context.Context, accessKey string, status AccountStatus) error
SetUserStatus - adds a status for a user.
func (*AdminClient) SiteReplicationAdd ¶
func (adm *AdminClient) SiteReplicationAdd(ctx context.Context, sites []PeerSite) (ReplicateAddStatus, error)
SiteReplicationAdd - sends the SR add API call.
func (*AdminClient) SiteReplicationEdit ¶
func (adm *AdminClient) SiteReplicationEdit(ctx context.Context, site PeerInfo) (ReplicateEditStatus, error)
SiteReplicationEdit - sends the SR edit API call.
func (*AdminClient) SiteReplicationInfo ¶
func (adm *AdminClient) SiteReplicationInfo(ctx context.Context) (info SiteReplicationInfo, err error)
SiteReplicationInfo - returns cluster replication information.
func (*AdminClient) SiteReplicationRemove ¶
func (adm *AdminClient) SiteReplicationRemove(ctx context.Context, removeReq SRRemoveReq) (st ReplicateRemoveStatus, err error)
SiteReplicationRemove - unlinks a site from site replication
func (*AdminClient) Speedtest ¶
func (adm *AdminClient) Speedtest(ctx context.Context, opts SpeedtestOpts) (chan SpeedTestResult, error)
Speedtest - perform speedtest on the MinIO servers
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. Deprecated: use Profile API instead
func (*AdminClient) StatusPool ¶
func (adm *AdminClient) StatusPool(ctx context.Context, pool string) (PoolStatus, error)
StatusPool return current status about pool, reports any draining activity in progress and elapsed time.
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) TierStats ¶
func (adm *AdminClient) TierStats(ctx context.Context) ([]TierInfo, error)
TierStats returns per-tier stats of all configured tiers (incl. internal hot-tier)
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, ops ...TargetUpdateType) (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
func (*AdminClient) VerifyTier ¶
func (adm *AdminClient) VerifyTier(ctx context.Context, tierName string) error
VerifyTier verifies tierName's remote tier config
type AzureOptions ¶
AzureOptions supports NewTierAzure to take variadic options
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 BandwidthDetails ¶
type BandwidthDetails struct { LimitInBytesPerSecond int64 `json:"limitInBits"` CurrentBandwidthInBytesPerSecond float64 `json:"currentBandwidth"` }
BandwidthDetails for the measured bandwidth
type BgHealState ¶
type BgHealState struct { // List of offline endpoints with no background heal state info OfflineEndpoints []string `json:"offline_nodes"` // Total items scanned by the continuous background healing ScannedItemsCount int64 // Disks currently in heal states HealDisks []string // SetStatus contains information for each set. Sets []SetStatus `json:"sets"` // Endpoint -> MRF Status MRF map[string]MRFStatus `json:"mrf"` // Parity per storage class SCParity map[string]int `json:"sc_parity"` }
BgHealState represents the status of the background heal
type BktOp ¶
type BktOp string
BktOp represents the bucket operation being requested.
const ( // make bucket and enable versioning MakeWithVersioningBktOp BktOp = "make-with-versioning" // add replication configuration ConfigureReplBktOp BktOp = "configure-replication" // delete bucket (forceDelete = off) DeleteBucketBktOp BktOp = "delete-bucket" // delete bucket (forceDelete = on) ForceDeleteBucketBktOp BktOp = "force-delete-bucket" )
BktOp value constants.
type BucketAccessInfo ¶
type BucketAccessInfo struct { Name string `json:"name"` Size uint64 `json:"size"` Objects uint64 `json:"objects"` ObjectSizesHistogram map[string]uint64 `json:"objectHistogram"` Details *BucketDetails `json:"details"` PrefixUsage map[string]uint64 `json:"prefixUsage"` 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 BucketBandwidthReport ¶
type BucketBandwidthReport struct {
BucketStats map[string]BandwidthDetails `json:"bucketStats,omitempty"`
}
BucketBandwidthReport captures the details for all buckets.
type BucketDetails ¶
type BucketDetails struct { Versioning bool `json:"versioning"` VersioningSuspended bool `json:"versioningSuspended"` Locking bool `json:"locking"` Replication bool `json:"replication"` Tagging *tags.Tags `json:"tags"` Quota *BucketQuota `json:"quota"` }
BucketDetails provides information about features currently turned-on per bucket.
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 *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"` BandwidthLimit int64 `json:"bandwidthlimit,omitempty"` ReplicationSync bool `json:"replicationSync"` StorageClass string `json:"storageclass,omitempty"` HealthCheckDuration time.Duration `json:"healthCheckDuration,omitempty"` DisableProxy bool `json:"disableProxy"` ResetBeforeDate time.Time `json:"resetBeforeDate,omitempty"` ResetID string `json:"resetID,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 CPU ¶
type CPU struct { VendorID string `json:"vendor_id"` Family string `json:"family"` Model string `json:"model"` Stepping int32 `json:"stepping"` PhysicalID string `json:"physical_id"` ModelName string `json:"model_name"` Mhz float64 `json:"mhz"` CacheSize int32 `json:"cache_size"` Flags []string `json:"flags"` Microcode string `json:"microcode"` Cores int `json:"cores"` // computed }
CPU contains system's CPU information.
type CPUs ¶
type CPUs struct { NodeCommon CPUs []CPU `json:"cpus,omitempty"` IsFreqGovPerf *bool `json:"is_freq_gov_perf,omitempty"` }
CPUs contains all CPU information of a node.
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 Credentials ¶
type Credentials struct { AccessKey string `xml:"AccessKeyId" json:"accessKey,omitempty"` SecretKey string `xml:"SecretAccessKey" json:"secretKey,omitempty"` SessionToken string `xml:"SessionToken" json:"sessionToken,omitempty"` Expiration time.Time `xml:"Expiration" json:"expiration,omitempty"` }
Credentials holds access and secret keys.
type DailyTierStats ¶
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"` // TierStats holds per-tier stats like bytes tiered, etc. TierStats map[string]TierStats `json:"tierStats"` // 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"` FreeInodes uint64 `json:"free_inodes,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 DiskLatency ¶
type DiskLatency struct { Avg float64 `json:"avg_secs,omitempty"` Percentile50 float64 `json:"percentile50_secs,omitempty"` Percentile90 float64 `json:"percentile90_secs,omitempty"` Percentile99 float64 `json:"percentile99_secs,omitempty"` Min float64 `json:"min_secs,omitempty"` Max float64 `json:"max_secs,omitempty"` }
DiskLatency holds latency information for write operations to the drive
type DiskMetrics ¶
type DiskMetrics struct { APILatencies map[string]interface{} `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, in nanosecond, of each API.
type DiskThroughput ¶
type DiskThroughput struct { Avg float64 `json:"avg_bytes_per_sec,omitempty"` Percentile50 float64 `json:"percentile50_bytes_per_sec,omitempty"` Percentile90 float64 `json:"percentile90_bytes_per_sec,omitempty"` Percentile99 float64 `json:"percentile99_bytes_per_sec,omitempty"` Min float64 `json:"min_bytes_per_sec,omitempty"` Max float64 `json:"max_bytes_per_sec,omitempty"` }
DiskThroughput holds throughput information for write operations to the drive
type DrivePerf ¶
type DrivePerf struct { Path string `json:"path"` ReadThroughput uint64 `json:"readThroughput"` WriteThroughput uint64 `json:"writeThroughput"` Error string `json:"error,omitempty"` }
DrivePerf - result of drive speed test on 1 drive mounted at path
type DrivePerfInfo ¶
type DrivePerfInfo struct { Error string `json:"error,omitempty"` Path string `json:"path"` Latency Latency `json:"latency,omitempty"` Throughput Throughput `json:"throughput,omitempty"` }
DrivePerfInfo contains disk drive's performance information.
type DrivePerfInfoV0 ¶
type DrivePerfInfoV0 struct { Path string `json:"endpoint"` Latency DiskLatency `json:"latency,omitempty"` Throughput DiskThroughput `json:"throughput,omitempty"` Error string `json:"error,omitempty"` }
DrivePerfInfoV0 - Stats about a single drive in a MinIO node
type DrivePerfInfos ¶
type DrivePerfInfos struct { NodeCommon SerialPerf []DrivePerfInfo `json:"serial_perf,omitempty"` ParallelPerf []DrivePerfInfo `json:"parallel_perf,omitempty"` }
DrivePerfInfos contains all disk drive's performance information of a node.
type DriveSpeedTestOpts ¶
type DriveSpeedTestOpts struct { Serial bool // Run speed tests one drive at a time BlockSize uint64 // BlockSize for read/write (default 4MiB) FileSize uint64 // Total fileSize to write and read (default 1GiB) }
DriveSpeedTestOpts provide configurable options for drive speedtest
type DriveSpeedTestResult ¶
type DriveSpeedTestResult struct { Version string `json:"version"` Endpoint string `json:"endpoint"` DrivePerf []DrivePerf `json:"drivePerf,omitempty"` Error string `json:"string,omitempty"` }
DriveSpeedTestResult - result of the drive speed test
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/madmin-go" ... ... 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 GCSOptions ¶
GCSOptions supports NewTierGCS to take variadic options
type GCStats ¶
type GCStats struct { LastGC time.Time `json:"last_gc"` // time of last collection NumGC int64 `json:"num_gc"` // number of garbage collections PauseTotal time.Duration `json:"pause_total"` // total pause for all collections Pause []time.Duration `json:"pause"` // pause history, most recent first PauseEnd []time.Time `json:"pause_end"` // pause end times history, most recent first }
GCStats collect information about recent garbage collections.
type GroupAddRemove ¶
type GroupAddRemove struct { Group string `json:"group"` Members []string `json:"members"` Status GroupStatus `json:"groupStatus"` 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"` UpdatedAt time.Time `json:"updatedAt,omitempty"` }
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"` NoLock bool `json:"nolock"` }
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"` ObjectsTotalCount uint64 `json:"objects_total_count"` ObjectsTotalSize uint64 `json:"objects_total_size"` ItemsHealed uint64 `json:"items_healed"` ItemsFailed uint64 `json:"items_failed"` BytesDone uint64 `json:"bytes_done"` BytesFailed uint64 `json:"bytes_failed"` ObjectsHealed uint64 `json:"objects_healed"` // Deprecated July 2021 ObjectsFailed uint64 `json:"objects_failed"` // Deprecated July 2021 // 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 = "driveperf" HealthDataTypePerfNet HealthDataType = "netperf" HealthDataTypePerfObj HealthDataType = "objperf" HealthDataTypeMinioInfo HealthDataType = "minioinfo" HealthDataTypeMinioConfig HealthDataType = "minioconfig" HealthDataTypeSysCPU HealthDataType = "syscpu" HealthDataTypeSysDriveHw HealthDataType = "sysdrivehw" 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" HealthDataTypeSysErrors HealthDataType = "syserrors" HealthDataTypeSysServices HealthDataType = "sysservices" HealthDataTypeSysConfig HealthDataType = "sysconfig" )
HealthDataTypes
type HealthInfo ¶
type HealthInfo struct { Version string `json:"version"` Error string `json:"error,omitempty"` TimeStamp time.Time `json:"timestamp,omitempty"` Sys SysInfo `json:"sys,omitempty"` Perf SpeedTestResults `json:"perf,omitempty"` Minio MinioHealthInfo `json:"minio,omitempty"` }
HealthInfo - MinIO cluster's health Info
func (HealthInfo) GetError ¶
func (info HealthInfo) GetError() string
GetError - returns error from the cluster health info
func (HealthInfo) GetStatus ¶
func (info HealthInfo) GetStatus() string
GetStatus - returns status of the cluster health info
func (HealthInfo) GetTimestamp ¶
func (info HealthInfo) GetTimestamp() time.Time
GetTimestamp - returns timestamp from the cluster health info
func (HealthInfo) JSON ¶
func (info HealthInfo) JSON() string
JSON returns this structure as JSON formatted string.
func (HealthInfo) String ¶
func (info HealthInfo) String() string
type HealthInfoV0 ¶
type HealthInfoV0 struct { TimeStamp time.Time `json:"timestamp,omitempty"` Error string `json:"error,omitempty"` Perf PerfInfoV0 `json:"perf,omitempty"` Minio MinioHealthInfoV0 `json:"minio,omitempty"` Sys SysHealthInfo `json:"sys,omitempty"` }
HealthInfoV0 - MinIO cluster's health Info version 0
func (HealthInfoV0) JSON ¶
func (info HealthInfoV0) JSON() string
JSON returns this structure as JSON formatted string.
func (HealthInfoV0) String ¶
func (info HealthInfoV0) String() string
type HealthInfoV2 ¶
type HealthInfoV2 struct { Version string `json:"version"` Error string `json:"error,omitempty"` TimeStamp time.Time `json:"timestamp,omitempty"` Sys SysInfo `json:"sys,omitempty"` Perf PerfInfo `json:"perf,omitempty"` Minio MinioHealthInfo `json:"minio,omitempty"` }
HealthInfoV2 - MinIO cluster's health Info version 2
func (HealthInfoV2) GetError ¶
func (info HealthInfoV2) GetError() string
GetError - returns error from the cluster health info v2
func (HealthInfoV2) GetStatus ¶
func (info HealthInfoV2) GetStatus() string
GetStatus - returns status of the cluster health info v2
func (HealthInfoV2) GetTimestamp ¶
func (info HealthInfoV2) GetTimestamp() time.Time
GetTimestamp - returns timestamp from the cluster health info v2
func (HealthInfoV2) JSON ¶
func (info HealthInfoV2) JSON() string
JSON returns this structure as JSON formatted string.
func (HealthInfoV2) String ¶
func (info HealthInfoV2) String() string
type HealthInfoVersionStruct ¶
type HealthInfoVersionStruct struct { Version string `json:"version,omitempty"` Error string `json:"error,omitempty"` }
HealthInfoVersionStruct - struct for health info version
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 IDPSettings ¶
type IDPSettings struct { LDAP LDAPSettings OpenID OpenIDSettings }
IDPSettings contains key IDentity Provider settings to validate that all peers have the same configuration.
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"` Versions Versions `json:"versions,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 InspectOptions ¶
type InspectOptions struct {
Volume, File string
}
InspectOptions provides options to Inspect.
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 KMSStatus ¶
type KMSStatus struct { Name string `json:"name"` // Name or type of the KMS DefaultKeyID string `json:"default-key-id"` // The key ID used when no explicit key is specified Endpoints map[string]ItemState `json:"endpoints"` // List of KMS endpoints and their status (online/offline) }
KMSStatus contains various informations about the KMS connected to a MinIO server - like the KMS endpoints and the default key ID.
type KVS ¶
type KVS []KV
KVS - is a shorthand for some wrapper functions to operate on list of key values.
type KubernetesInfo ¶
type KubernetesInfo struct { Major string `json:"major,omitempty"` Minor string `json:"minor,omitempty"` GitVersion string `json:"gitVersion,omitempty"` GitCommit string `json:"gitCommit,omitempty"` BuildDate time.Time `json:"buildDate,omitempty"` Platform string `json:"platform,omitempty"` Error string `json:"error,omitempty"` }
KubernetesInfo - Information about the kubernetes platform
type LDAPSettings ¶
type LDAPSettings struct { IsLDAPEnabled bool LDAPUserDNSearchBase string LDAPUserDNSearchFilter string LDAPGroupSearchBase string LDAPGroupSearchFilter string }
LDAPSettings contains LDAP configuration info of a cluster.
type Latency ¶
type Latency struct { Avg float64 `json:"avg"` Max float64 `json:"max"` Min float64 `json:"min"` Percentile50 float64 `json:"percentile_50"` Percentile90 float64 `json:"percentile_90"` Percentile99 float64 `json:"percentile_99"` }
Latency contains write operation latency in seconds of a disk drive.
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 MRFStatus ¶
type MRFStatus struct { BytesHealed uint64 `json:"bytes_healed"` ItemsHealed uint64 `json:"items_healed"` TotalItems uint64 `json:"total_items"` TotalBytes uint64 `json:"total_bytes"` Started time.Time `json:"started"` }
MRFStatus exposes MRF metrics of a server
type MemInfo ¶
type MemInfo struct { NodeCommon Total uint64 `json:"total,omitempty"` Available uint64 `json:"available,omitempty"` SwapSpaceTotal uint64 `json:"swap_space_total,omitempty"` SwapSpaceFree uint64 `json:"swap_space_free,omitempty"` }
MemInfo contains system's RAM and swap information.
type MemStats ¶
type MemStats struct { Alloc uint64 TotalAlloc uint64 Mallocs uint64 Frees uint64 HeapAlloc uint64 }
MemStats is strip down version of runtime.MemStats containing memory stats of MinIO server.
type MinIOOptions ¶
MinIOOptions supports NewTierMinIO to take variadic options
type MinioConfig ¶
type MinioConfig struct { Error string `json:"error,omitempty"` Config interface{} `json:"config,omitempty"` }
MinioConfig contains minio configuration of a node.
type MinioHealthInfo ¶
type MinioHealthInfo struct { Error string `json:"error,omitempty"` Config MinioConfig `json:"config,omitempty"` Info MinioInfo `json:"info,omitempty"` }
MinioHealthInfo - Includes MinIO confifuration information
type MinioHealthInfoV0 ¶
type MinioHealthInfoV0 struct { Info InfoMessage `json:"info,omitempty"` Config interface{} `json:"config,omitempty"` Error string `json:"error,omitempty"` }
MinioHealthInfoV0 - Includes MinIO confifuration information
type MinioInfo ¶
type MinioInfo 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 []ServerInfo `json:"servers,omitempty"` TLS *TLSInfo `json:"tls"` IsKubernetes *bool `json:"is_kubernetes"` IsDocker *bool `json:"is_docker"` }
MinioInfo contains MinIO server and object storage information.
type NetLatency ¶
type NetLatency struct { Avg float64 `json:"avg_secs,omitempty"` Percentile50 float64 `json:"percentile50_secs,omitempty"` Percentile90 float64 `json:"percentile90_secs,omitempty"` Percentile99 float64 `json:"percentile99_secs,omitempty"` Min float64 `json:"min_secs,omitempty"` Max float64 `json:"max_secs,omitempty"` }
NetLatency holds latency information for read/write operations to the drive
type NetPerfInfo ¶
type NetPerfInfo struct { NodeCommon RemotePeers []PeerNetPerfInfo `json:"remote_peers,omitempty"` }
NetPerfInfo contains network performance information of a node to other nodes.
type NetPerfInfoV0 ¶
type NetPerfInfoV0 struct { Addr string `json:"remote"` Latency NetLatency `json:"latency,omitempty"` Throughput NetThroughput `json:"throughput,omitempty"` Error string `json:"error,omitempty"` }
NetPerfInfoV0 - one-to-one network connectivity Stats between 2 MinIO nodes
type NetThroughput ¶
type NetThroughput struct { Avg float64 `json:"avg_bytes_per_sec,omitempty"` Percentile50 float64 `json:"percentile50_bytes_per_sec,omitempty"` Percentile90 float64 `json:"percentile90_bytes_per_sec,omitempty"` Percentile99 float64 `json:"percentile99_bytes_per_sec,omitempty"` Min float64 `json:"min_bytes_per_sec,omitempty"` Max float64 `json:"max_bytes_per_sec,omitempty"` }
NetThroughput holds throughput information for read/write operations to the drive
type NetperfNodeResult ¶
type NetperfNodeResult struct { Endpoint string `json:"endpoint"` TX uint64 `json:"tx"` RX uint64 `json:"rx"` Error string `json:"error,omitempty"` }
NetperfNodeResult - stats from each server
type NetperfResult ¶
type NetperfResult struct {
NodeResults []NetperfNodeResult `json:"nodeResults"`
}
NetperfResult - aggregate results from all servers
type NodeCommon ¶
NodeCommon - Common fields across most node-specific health structs
func (*NodeCommon) GetAddr ¶
func (n *NodeCommon) GetAddr() string
GetAddr - return the address of the node
func (*NodeCommon) SetAddr ¶
func (n *NodeCommon) SetAddr(addr string)
SetAddr - set the address of the node
func (*NodeCommon) SetError ¶
func (n *NodeCommon) SetError(err string)
SetError - set the address of the node
type NodeInfo ¶
NodeInfo - Interface to abstract any struct that contains address/endpoint and error fields
type OSInfo ¶
type OSInfo struct { NodeCommon Info host.InfoStat `json:"info,omitempty"` Sensors []host.TemperatureStat `json:"sensors,omitempty"` }
OSInfo contains operating system's information.
type OpenIDProviderSettings ¶
type OpenIDProviderSettings struct { ClaimName string ClaimUserinfoEnabled bool RolePolicy string ClientID string HashedClientSecret string }
OpenIDProviderSettings contains info on a particular OIDC based provider.
type OpenIDSettings ¶
type OpenIDSettings struct { // Enabled is true iff there is at least one OpenID provider configured. Enabled bool Region string // Map of role ARN to provider info Roles map[string]OpenIDProviderSettings // Info on the claim based provider (all fields are empty if not // present) ClaimProvider OpenIDProviderSettings }
OpenIDSettings contains OpenID configuration info of a cluster.
type Options ¶
type Options struct { Creds *credentials.Credentials Secure bool }
Options for New method
type Partition ¶
type Partition struct { Error string `json:"error,omitempty"` Device string `json:"device,omitempty"` Mountpoint string `json:"mountpoint,omitempty"` FSType string `json:"fs_type,omitempty"` MountOptions string `json:"mount_options,omitempty"` MountFSType string `json:"mount_fs_type,omitempty"` SpaceTotal uint64 `json:"space_total,omitempty"` SpaceFree uint64 `json:"space_free,omitempty"` InodeTotal uint64 `json:"inode_total,omitempty"` InodeFree uint64 `json:"inode_free,omitempty"` }
Partition contains disk partition's information.
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 SmartInfo `json:"smartInfo,omitempty"` }
PartitionStat - includes data from both shirou/psutil.diskHw.PartitionStat as well as SMART data
type Partitions ¶
type Partitions struct { NodeCommon Partitions []Partition `json:"partitions,omitempty"` }
Partitions contains all disk partitions information of a node.
func GetPartitions ¶
func GetPartitions(ctx context.Context, addr string) Partitions
GetPartitions returns all disk partitions information of a node running linux only operating system.
type PeerInfo ¶
type PeerInfo struct { Endpoint string `json:"endpoint"` Name string `json:"name"` // Deployment ID is useful as it is immutable - though endpoint may // change. DeploymentID string `json:"deploymentID"` }
PeerInfo - contains some properties of a cluster peer.
type PeerNetPerfInfo ¶
type PeerNetPerfInfo struct { NodeCommon Latency Latency `json:"latency,omitempty"` Throughput Throughput `json:"throughput,omitempty"` }
PeerNetPerfInfo contains network performance information of a node.
type PeerSite ¶
type PeerSite struct { Name string `json:"name"` Endpoint string `json:"endpoints"` AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` }
PeerSite - represents a cluster/site to be added to the set of replicated sites.
type PerfInfo ¶
type PerfInfo struct { Drives []DrivePerfInfos `json:"drives,omitempty"` Net []NetPerfInfo `json:"net,omitempty"` NetParallel NetPerfInfo `json:"net_parallel,omitempty"` }
PerfInfo - Includes Drive and Net perf info for the entire MinIO cluster
type PerfInfoV0 ¶
type PerfInfoV0 struct { DriveInfo []ServerDrivesInfo `json:"drives,omitempty"` Net []ServerNetHealthInfo `json:"net,omitempty"` NetParallel ServerNetHealthInfo `json:"net_parallel,omitempty"` Error string `json:"error,omitempty"` }
PerfInfoV0 - Includes Drive and Net perf info for the entire MinIO cluster
type PolicyInfo ¶
type PolicyInfo struct { PolicyName string Policy json.RawMessage CreateDate time.Time `json:",omitempty"` UpdateDate time.Time `json:",omitempty"` }
PolicyInfo contains information on a policy.
func (PolicyInfo) MarshalJSON ¶
func (pi PolicyInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshaller for JSON
type PoolDecommissionInfo ¶
type PoolDecommissionInfo struct { StartTime time.Time `json:"startTime"` StartSize int64 `json:"startSize"` TotalSize int64 `json:"totalSize"` CurrentSize int64 `json:"currentSize"` Complete bool `json:"complete"` Failed bool `json:"failed"` Canceled bool `json:"canceled"` }
PoolDecommissionInfo currently draining information
type PoolStatus ¶
type PoolStatus struct { ID int `json:"id"` CmdLine string `json:"cmdline"` LastUpdate time.Time `json:"lastUpdate"` Decommission *PoolDecommissionInfo `json:"decommissionInfo,omitempty"` }
PoolStatus captures current pool status
type ProcInfo ¶
type ProcInfo struct { NodeCommon PID int32 `json:"pid,omitempty"` IsBackground bool `json:"is_background,omitempty"` CPUPercent float64 `json:"cpu_percent,omitempty"` ChildrenPIDs []int32 `json:"children_pids,omitempty"` CmdLine string `json:"cmd_line,omitempty"` NumConnections int `json:"num_connections,omitempty"` CreateTime int64 `json:"create_time,omitempty"` CWD string `json:"cwd,omitempty"` ExecPath string `json:"exec_path,omitempty"` GIDs []int32 `json:"gids,omitempty"` IOCounters process.IOCountersStat `json:"iocounters,omitempty"` IsRunning bool `json:"is_running,omitempty"` MemInfo process.MemoryInfoStat `json:"mem_info,omitempty"` MemMaps []process.MemoryMapsStat `json:"mem_maps,omitempty"` MemPercent float32 `json:"mem_percent,omitempty"` Name string `json:"name,omitempty"` Nice int32 `json:"nice,omitempty"` NumCtxSwitches process.NumCtxSwitchesStat `json:"num_ctx_switches,omitempty"` NumFDs int32 `json:"num_fds,omitempty"` NumThreads int32 `json:"num_threads,omitempty"` PageFaults process.PageFaultsStat `json:"page_faults,omitempty"` PPID int32 `json:"ppid,omitempty"` Status string `json:"status,omitempty"` TGID int32 `json:"tgid,omitempty"` Times cpu.TimesStat `json:"times,omitempty"` UIDs []int32 `json:"uids,omitempty"` Username string `json:"username,omitempty"` }
ProcInfo contains current process's information.
type ProfilerType ¶
type ProfilerType string
ProfilerType represents the profiler type passed to the profiler subsystem.
const ( ProfilerCPU ProfilerType = "cpu" // represents CPU profiler type ProfilerCPUIO ProfilerType = "cpuio" // represents CPU with IO (fgprof) 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 QuotaType ¶
type QuotaType string
QuotaType represents bucket quota type
const ( // HardQuota specifies a hard quota of usage for bucket HardQuota QuotaType = "hard" )
type ReplicateAddStatus ¶
type ReplicateAddStatus struct { Success bool `json:"success"` Status string `json:"status"` ErrDetail string `json:"errorDetail,omitempty"` InitialSyncErrorMessage string `json:"initialSyncErrorMessage,omitempty"` }
ReplicateAddStatus - returns status of add request.
type ReplicateEditStatus ¶
type ReplicateEditStatus struct { Success bool `json:"success"` Status string `json:"status"` ErrDetail string `json:"errorDetail,omitempty"` }
ReplicateEditStatus - returns status of edit request.
type ReplicateRemoveStatus ¶
type ReplicateRemoveStatus struct { Status string `json:"status"` ErrDetail string `json:"errorDetail,omitempty"` }
ReplicateRemoveStatus - returns status of unlink request.
type Report ¶
type Report struct { Report BucketBandwidthReport `json:"report"` Err error `json:"error,omitempty"` }
Report includes the bandwidth report or the error encountered.
type RequestData ¶
type RequestData struct { CustomHeaders http.Header QueryValues url.Values RelPath string // URL path relative to admin API base endpoint Content []byte }
RequestData exposing internal data structure requestData
type SRBucketInfo ¶
type SRBucketInfo struct { Bucket string `json:"bucket"` Policy json.RawMessage `json:"policy,omitempty"` // Since Versioning config does not have a json representation, we use // xml byte presentation directly. Versioning *string `json:"versioningConfig,omitempty` // Since tags does not have a json representation, we use its xml byte // representation directly. Tags *string `json:"tags,omitempty"` // Since object lock does not have a json representation, we use its xml // byte representation. ObjectLockConfig *string `json:"objectLockConfig,omitempty"` // Since SSE config does not have a json representation, we use its xml // byte respresentation. SSEConfig *string `json:"sseConfig,omitempty"` // replication config in json representation ReplicationConfig *string `json:"replicationConfig,omitempty"` // quota config in json representation QuotaConfig *string `json:"quotaConfig,omitempty"` // time stamps of bucket metadata updates PolicyUpdatedAt time.Time `json:"policyTimestamp,omitempty"` TagConfigUpdatedAt time.Time `json:"tagTimestamp,omitempty"` ObjectLockConfigUpdatedAt time.Time `json:"olockTimestamp,omitempty"` SSEConfigUpdatedAt time.Time `json:"sseTimestamp,omitempty"` VersioningConfigUpdatedAt time.Time `json:"versioningTimestamp,omitempty"` ReplicationConfigUpdatedAt time.Time `json:"replicationConfigTimestamp,omitempty"` QuotaConfigUpdatedAt time.Time `json:"quotaTimestamp,omitempty"` CreatedAt time.Time `json:"bucketTimestamp,omitempty"` Location string `json:"location,omitempty"` }
SRBucketInfo - returns all the bucket metadata available for bucket
type SRBucketMeta ¶
type SRBucketMeta struct { Type string `json:"type"` Bucket string `json:"bucket"` Policy json.RawMessage `json:"policy,omitempty"` // Since Versioning config does not have a json representation, we use // xml byte presentation directly. Versioning *string `json:"versioningConfig,omitempty` // Since tags does not have a json representation, we use its xml byte // representation directly. Tags *string `json:"tags,omitempty"` // Since object lock does not have a json representation, we use its xml // byte representation. ObjectLockConfig *string `json:"objectLockConfig,omitempty"` // Since SSE config does not have a json representation, we use its xml // byte respresentation. SSEConfig *string `json:"sseConfig,omitempty"` // Quota has a json representation use it as is. Quota json.RawMessage `json:"quota,omitempty"` }
SRBucketMeta - represents a bucket metadata change that will be copied to a peer.
type SRBucketStatsSummary ¶
type SRBucketStatsSummary struct { DeploymentID string HasBucket bool TagMismatch bool VersioningConfigMismatch bool OLockConfigMismatch bool PolicyMismatch bool SSEConfigMismatch bool ReplicationCfgMismatch bool QuotaCfgMismatch bool HasTagsSet bool HasOLockConfigSet bool HasPolicySet bool HasSSECfgSet bool HasReplicationCfg bool HasQuotaCfgSet bool }
SRBucketStatsSummary has status of bucket metadata replication misses
type SREntityType ¶
type SREntityType int
SREntityType specifies type of entity
const ( // Unspecified entity Unspecified SREntityType = iota // SRBucketEntity Bucket entity type SRBucketEntity // SRPolicyEntity Policy entity type SRPolicyEntity // SRUserEntity User entity type SRUserEntity // SRGroupEntity Group entity type SRGroupEntity )
func GetSREntityType ¶
func GetSREntityType(name string) SREntityType
GetSREntityType returns the SREntityType for a key
type SRGroupInfo ¶
type SRGroupInfo struct {
UpdateReq GroupAddRemove `json:"updateReq"`
}
SRGroupInfo - represents a regular (IAM) user to be replicated.
type SRGroupStatsSummary ¶
type SRGroupStatsSummary struct { DeploymentID string PolicyMismatch bool HasGroup bool GroupDescMismatch bool HasPolicyMapping bool }
SRGroupStatsSummary has status of group replication misses
type SRIAMItem ¶
type SRIAMItem struct { Type string `json:"type"` // Name and Policy below are used when Type == SRIAMItemPolicy Name string `json:"name"` Policy json.RawMessage `json:"policy"` // Used when Type == SRIAMItemPolicyMapping PolicyMapping *SRPolicyMapping `json:"policyMapping"` // Used when Type == SRIAMItemSvcAcc SvcAccChange *SRSvcAccChange `json:"serviceAccountChange"` // Used when Type = SRIAMItemSTSAcc STSCredential *SRSTSCredential `json:"stsCredential"` // Used when Type = SRIAMItemIAMUser IAMUser *SRIAMUser `json:"iamUser"` // Used when Type = SRIAMItemGroupInfo GroupInfo *SRGroupInfo `json:"groupInfo"` }
SRIAMItem - represents an IAM object that will be copied to a peer.
type SRIAMPolicy ¶
type SRIAMPolicy struct { Policy json.RawMessage `json:"policy"` UpdatedAt time.Time `json:"updatedAt,omitempty"` }
SRIAMPolicy - represents an IAM policy.
type SRIAMUser ¶
type SRIAMUser struct { AccessKey string `json:"accessKey"` IsDeleteReq bool `json:"isDeleteReq"` UserReq *AddOrUpdateUserReq `json:"userReq"` }
SRIAMUser - represents a regular (IAM) user to be replicated. A nil UserReq implies that a user delete operation should be replicated on the peer cluster.
type SRInfo ¶
type SRInfo struct { Enabled bool Name string DeploymentID string Buckets map[string]SRBucketInfo // map of bucket metadata info Policies map[string]SRIAMPolicy // map of IAM policy name to content UserPolicies map[string]SRPolicyMapping // map of username -> user policy mapping UserInfoMap map[string]UserInfo // map of user name to UserInfo GroupDescMap map[string]GroupDesc // map of group name to GroupDesc GroupPolicies map[string]SRPolicyMapping // map of groupname -> group policy mapping ReplicationCfg map[string]replication.Config // map of bucket -> replication config }
SRInfo gets replication metadata for a site
type SRPeerJoinReq ¶
type SRPeerJoinReq struct { SvcAcctAccessKey string `json:"svcAcctAccessKey"` SvcAcctSecretKey string `json:"svcAcctSecretKey"` SvcAcctParent string `json:"svcAcctParent"` Peers map[string]PeerInfo `json:"peers"` }
SRPeerJoinReq - arg body for SRPeerJoin
type SRPolicyMapping ¶
type SRPolicyMapping struct { UserOrGroup string `json:"userOrGroup"` IsGroup bool `json:"isGroup"` Policy string `json:"policy"` CreatedAt time.Time `json:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` }
SRPolicyMapping - represents mapping of a policy to a user or group.
type SRPolicyStatsSummary ¶
SRPolicyStatsSummary has status of policy replication misses
type SRRemoveReq ¶
type SRRemoveReq struct { SiteNames []string `json:"sites"` RemoveAll bool `json:"all"` // true if all sites are to be removed. }
SRRemoveReq - arg body for SRRemoveReq
type SRSTSCredential ¶
type SRSTSCredential struct { AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` SessionToken string `json:"sessionToken"` ParentUser string `json:"parentUser"` ParentPolicyMapping string `json:"parentPolicyMapping,omitempty"` }
SRSTSCredential - represents an STS credential to be replicated.
type SRSiteSummary ¶
type SRSiteSummary struct { ReplicatedBuckets int // count of buckets replicated across sites ReplicatedTags int // count of buckets with tags replicated across sites ReplicatedBucketPolicies int // count of policies replicated across sites ReplicatedIAMPolicies int // count of IAM policies replicated across sites ReplicatedUsers int // count of users replicated across sites ReplicatedGroups int // count of groups replicated across sites ReplicatedLockConfig int // count of object lock config replicated across sites ReplicatedSSEConfig int // count of SSE config replicated across sites ReplicatedVersioningConfig int // count of versioning config replicated across sites ReplicatedQuotaConfig int // count of bucket with quota config replicated across sites ReplicatedUserPolicyMappings int // count of user policy mappings replicated across sites ReplicatedGroupPolicyMappings int // count of group policy mappings replicated across sites TotalBucketsCount int // total buckets on this site TotalTagsCount int // total count of buckets with tags on this site TotalBucketPoliciesCount int // total count of buckets with bucket policies for this site TotalIAMPoliciesCount int // total count of IAM policies for this site TotalLockConfigCount int // total count of buckets with object lock config for this site TotalSSEConfigCount int // total count of buckets with SSE config TotalVersioningConfigCount int // total count of bucekts with versioning config TotalQuotaConfigCount int // total count of buckets with quota config TotalUsersCount int // total number of users seen on this site TotalGroupsCount int // total number of groups seen on this site TotalUserPolicyMappingCount int // total number of user policy mappings seen on this site TotalGroupPolicyMappingCount int // total number of group policy mappings seen on this site }
SRSiteSummary holds the count of replicated items in site replication
type SRStatusInfo ¶
type SRStatusInfo struct { Enabled bool MaxBuckets int // maximum buckets seen across sites MaxUsers int // maximum users seen across sites MaxGroups int // maximum groups seen across sites MaxPolicies int // maximum policies across sites Sites map[string]PeerInfo // deployment->sitename StatsSummary map[string]SRSiteSummary // map of deployment id -> site stat // BucketStats map of bucket to slice of deployment IDs with stats. This is populated only if there are // mismatches or if a specific bucket's stats are requested BucketStats map[string]map[string]SRBucketStatsSummary // PolicyStats map of policy to slice of deployment IDs with stats. This is populated only if there are // mismatches or if a specific bucket's stats are requested PolicyStats map[string]map[string]SRPolicyStatsSummary // UserStats map of user to slice of deployment IDs with stats. This is populated only if there are // mismatches or if a specific bucket's stats are requested UserStats map[string]map[string]SRUserStatsSummary // GroupStats map of group to slice of deployment IDs with stats. This is populated only if there are // mismatches or if a specific bucket's stats are requested GroupStats map[string]map[string]SRGroupStatsSummary }
SRStatusInfo returns detailed status on site replication status
type SRStatusOptions ¶
type SRStatusOptions struct { Buckets bool Policies bool Users bool Groups bool Entity SREntityType EntityValue string }
SRStatusOptions holds SR status options
func (*SRStatusOptions) IsEntitySet ¶
func (o *SRStatusOptions) IsEntitySet() bool
IsEntitySet returns true if entity option is set
type SRSvcAccChange ¶
type SRSvcAccChange struct { Create *SRSvcAccCreate `json:"crSvcAccCreate"` Update *SRSvcAccUpdate `json:"crSvcAccUpdate"` Delete *SRSvcAccDelete `json:"crSvcAccDelete"` }
SRSvcAccChange - sum-type to represent an svc account change.
type SRSvcAccCreate ¶
type SRSvcAccCreate struct { Parent string `json:"parent"` AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` Groups []string `json:"groups"` Claims map[string]interface{} `json:"claims"` SessionPolicy json.RawMessage `json:"sessionPolicy"` Status string `json:"status"` }
SRSvcAccCreate - create operation
type SRSvcAccDelete ¶
type SRSvcAccDelete struct {
AccessKey string `json:"accessKey"`
}
SRSvcAccDelete - delete operation
type SRSvcAccUpdate ¶
type SRSvcAccUpdate struct { AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` Status string `json:"status"` SessionPolicy json.RawMessage `json:"sessionPolicy"` }
SRSvcAccUpdate - update operation
type SRUserStatsSummary ¶
type SRUserStatsSummary struct { DeploymentID string PolicyMismatch bool UserInfoMismatch bool HasUser bool HasPolicyMapping bool }
SRUserStatsSummary has status of user replication misses
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 []DrivePerfInfoV0 `json:"serial,omitempty"` // Drive perf info collected one drive at a time Parallel []DrivePerfInfoV0 `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 ServerInfo ¶
type ServerInfo 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"` Drives []Disk `json:"drives,omitempty"` PoolNumber int `json:"poolNumber,omitempty"` MemStats MemStats `json:"mem_stats"` GOMAXPROCS int `json:"gomaxprocs"` NumCPU int `json:"num_cpu"` RuntimeVersion string `json:"runtime_version"` GCStats GCStats `json:"gc_stats"` MinioEnvVars map[string]string `json:"minio_env_vars"` }
ServerInfo holds server information
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 []NetPerfInfoV0 `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 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
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" )
func (ServiceType) IsValid ¶
func (t ServiceType) IsValid() bool
IsValid returns true if ARN type represents replication
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"` TotalObjects int `json:"total_objects"` Disks []Disk `json:"disks"` }
SetStatus contains information about the heal status of a set.
type SiteReplicationInfo ¶
type SiteReplicationInfo struct { Enabled bool `json:"enabled"` Name string `json:"name,omitempty"` Sites []PeerInfo `json:"sites,omitempty"` ServiceAccountAccessKey string `json:"serviceAccountAccessKey,omitempty"` }
SiteReplicationInfo - contains cluster replication information.
type SmartAtaInfo ¶
type SmartAtaInfo struct { LUWWNDeviceID string `json:"scsiLuWWNDeviceID,omitempty"` SerialNum string `json:"serialNum,omitempty"` ModelNum string `json:"modelNum,omitempty"` FirmwareRevision string `json:"firmwareRevision,omitempty"` RotationRate string `json:"RotationRate,omitempty"` ATAMajorVersion string `json:"MajorVersion,omitempty"` ATAMinorVersion string `json:"MinorVersion,omitempty"` SmartSupportAvailable bool `json:"smartSupportAvailable,omitempty"` SmartSupportEnabled bool `json:"smartSupportEnabled,omitempty"` ErrorLog string `json:"smartErrorLog,omitempty"` Transport string `json:"transport,omitempty"` }
SmartAtaInfo contains ATA drive info
type SmartInfo ¶
type SmartInfo struct { Device string `json:"device"` Scsi *SmartScsiInfo `json:"scsi,omitempty"` Nvme *SmartNvmeInfo `json:"nvme,omitempty"` Ata *SmartAtaInfo `json:"ata,omitempty"` }
SmartInfo contains S.M.A.R.T data about the drive
type SmartNvmeInfo ¶
type SmartNvmeInfo struct { SerialNum string `json:"serialNum,omitempty"` VendorID string `json:"vendorId,omitempty"` FirmwareVersion string `json:"firmwareVersion,omitempty"` ModelNum string `json:"modelNum,omitempty"` SpareAvailable string `json:"spareAvailable,omitempty"` SpareThreshold string `json:"spareThreshold,omitempty"` Temperature string `json:"temperature,omitempty"` CriticalWarning string `json:"criticalWarning,omitempty"` MaxDataTransferPages int `json:"maxDataTransferPages,omitempty"` ControllerBusyTime *big.Int `json:"controllerBusyTime,omitempty"` PowerOnHours *big.Int `json:"powerOnHours,omitempty"` PowerCycles *big.Int `json:"powerCycles,omitempty"` UnsafeShutdowns *big.Int `json:"unsafeShutdowns,omitempty"` MediaAndDataIntegrityErrors *big.Int `json:"mediaAndDataIntgerityErrors,omitempty"` DataUnitsReadBytes *big.Int `json:"dataUnitsReadBytes,omitempty"` DataUnitsWrittenBytes *big.Int `json:"dataUnitsWrittenBytes,omitempty"` HostReadCommands *big.Int `json:"hostReadCommands,omitempty"` HostWriteCommands *big.Int `json:"hostWriteCommands,omitempty"` }
SmartNvmeInfo contains NVMe drive info
type SmartScsiInfo ¶
type SmartScsiInfo struct { CapacityBytes int64 `json:"scsiCapacityBytes,omitempty"` ModeSenseBuf string `json:"scsiModeSenseBuf,omitempty"` RespLen int64 `json:"scsirespLen,omitempty"` BdLen int64 `json:"scsiBdLen,omitempty"` Offset int64 `json:"scsiOffset,omitempty"` RPM int64 `json:"sciRpm,omitempty"` }
SmartScsiInfo contains SCSI drive Info
type SpeedTestResult ¶
type SpeedTestResult struct { Version string `json:"version"` Servers int `json:"servers"` Disks int `json:"disks"` Size int `json:"size"` Concurrent int `json:"concurrent"` PUTStats SpeedTestStats GETStats SpeedTestStats }
SpeedTestResult - result of the speedtest() call
type SpeedTestResults ¶
type SpeedTestResults struct { DrivePerf []DriveSpeedTestResult `json:"drive,omitempty"` ObjPerf []SpeedTestResult `json:"obj,omitempty"` NetPerf []NetperfNodeResult `json:"net,omitempty"` Error string `json:"error,omitempty"` }
SpeedTestResults - Includes perf test results of the MinIO cluster
type SpeedTestStatServer ¶
type SpeedTestStatServer struct { Endpoint string `json:"endpoint"` ThroughputPerSec uint64 `json:"throughputPerSec"` ObjectsPerSec uint64 `json:"objectsPerSec"` Err string `json:"err"` }
SpeedTestStatServer - stats of a server
type SpeedTestStats ¶
type SpeedTestStats struct { ThroughputPerSec uint64 `json:"throughputPerSec"` ObjectsPerSec uint64 `json:"objectsPerSec"` Servers []SpeedTestStatServer `json:"servers"` }
SpeedTestStats - stats of all the servers
type SpeedtestOpts ¶
type SpeedtestOpts struct { Size int // Object size used in speed test Concurrency int // Concurrency used in speed test Duration time.Duration // Total duration of the speed test Autotune bool // Enable autotuning StorageClass string // Choose type of storage-class to be used while testing I/O }
SpeedtestOpts provide configurable options for speedtest
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 SysConfig ¶
type SysConfig struct { NodeCommon Config map[string]interface{} `json:"config,omitempty"` }
SysConfig - info about services that affect minio
type SysErrors ¶
type SysErrors struct { NodeCommon Errors []string `json:"errors,omitempty"` }
SysErrors - contains a system error
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 SysInfo ¶
type SysInfo struct { CPUInfo []CPUs `json:"cpus,omitempty"` Partitions []Partitions `json:"partitions,omitempty"` OSInfo []OSInfo `json:"osinfo,omitempty"` MemInfo []MemInfo `json:"meminfo,omitempty"` ProcInfo []ProcInfo `json:"procinfo,omitempty"` SysErrs []SysErrors `json:"errors,omitempty"` SysServices []SysServices `json:"services,omitempty"` SysConfig []SysConfig `json:"config,omitempty"` KubernetesInfo KubernetesInfo `json:"kubernetes"` }
SysInfo - 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
func (SysProcess) GetOwner ¶
func (sp SysProcess) GetOwner() string
GetOwner - returns owner of the process
type SysService ¶
SysService - name and status of a sys service
type SysServices ¶
type SysServices struct { NodeCommon Services []SysService `json:"services,omitempty"` }
SysServices - info about services that affect minio
func GetSysServices ¶
func GetSysServices(ctx context.Context, addr string) SysServices
GetSysServices returns info of sys services that affect minio
type Target ¶
Target signifies an individual target
func ParseSubSysTarget ¶
ParseSubSysTarget - parse a sub-system target
type TargetUpdateType ¶
type TargetUpdateType int
TargetUpdateType - type of update on the remote target
const ( // CredentialsUpdateType update creds CredentialsUpdateType TargetUpdateType = 1 + iota // SyncUpdateType update synchronous replication setting SyncUpdateType // ProxyUpdateType update proxy setting ProxyUpdateType // BandwidthLimitUpdateType update bandwidth limit BandwidthLimitUpdateType // HealthCheckDurationUpdateType update health check duration HealthCheckDurationUpdateType // PathUpdateType update Path PathUpdateType // ResetUpdateType sets ResetBeforeDate and ResetID on a bucket target ResetUpdateType )
func GetTargetUpdateOps ¶
func GetTargetUpdateOps(values url.Values) []TargetUpdateType
GetTargetUpdateOps returns a slice of update operations being performed with `mc admin bucket remote edit`
type Throughput ¶
type Throughput struct { Avg uint64 `json:"avg"` Max uint64 `json:"max"` Min uint64 `json:"min"` Percentile50 uint64 `json:"percentile_50"` Percentile90 uint64 `json:"percentile_90"` Percentile99 uint64 `json:"percentile_99"` }
Throughput contains write performance in bytes per second of a disk drive.
type TierAzure ¶
type TierAzure struct { Endpoint string `json:",omitempty"` AccountName string `json:",omitempty"` AccountKey string `json:",omitempty"` Bucket string `json:",omitempty"` Prefix string `json:",omitempty"` Region string `json:",omitempty"` StorageClass string `json:",omitempty"` }
TierAzure represents the remote tier configuration for Azure Blob Storage.
func (*TierAzure) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type TierConfig ¶
type TierConfig struct { Version string Type TierType `json:",omitempty"` Name string `json:",omitempty"` S3 *TierS3 `json:",omitempty"` Azure *TierAzure `json:",omitempty"` GCS *TierGCS `json:",omitempty"` MinIO *TierMinIO `json:",omitempty"` }
TierConfig represents the different remote tier backend configurations supported. The specific backend is identified by the Type field. It has a Version field to allow for backwards-compatible extension in the future.
func NewTierAzure ¶
func NewTierAzure(name, accountName, accountKey, bucket string, options ...AzureOptions) (*TierConfig, error)
NewTierAzure returns a TierConfig of Azure type. Returns error if the given parameters are invalid like name is empty etc.
Example ¶
simpleAzSC, err := NewTierAzure("simple-az", "accessKey", "secretKey", "testbucket") if err != nil { log.Fatalln(err, "Failed to create azure backed tier") } fmt.Println(simpleAzSC) fullyCustomAzSC, err := NewTierAzure("custom-az", "accessKey", "secretKey", "testbucket", AzureEndpoint("http://blob.core.windows.net"), AzurePrefix("testprefix")) if err != nil { log.Fatalln(err, "Failed to create azure backed tier") } fmt.Println(fullyCustomAzSC)
Output:
func NewTierGCS ¶
func NewTierGCS(name string, credsJSON []byte, bucket string, options ...GCSOptions) (*TierConfig, error)
NewTierGCS returns a TierConfig of GCS type. Returns error if the given parameters are invalid like name is empty etc.
Example ¶
credsJSON := []byte("credentials json content goes here") simpleGCSSC, err := NewTierGCS("simple-gcs", credsJSON, "testbucket") if err != nil { log.Fatalln(err, "Failed to create GCS backed tier") } fmt.Println(simpleGCSSC) fullyCustomGCSSC, err := NewTierGCS("custom-gcs", credsJSON, "testbucket", GCSPrefix("testprefix")) if err != nil { log.Fatalln(err, "Failed to create GCS backed tier") } fmt.Println(fullyCustomGCSSC)
Output:
func NewTierMinIO ¶
func NewTierMinIO(name, endpoint, accessKey, secretKey, bucket string, options ...MinIOOptions) (*TierConfig, error)
func NewTierS3 ¶
func NewTierS3(name, accessKey, secretKey, bucket string, options ...S3Options) (*TierConfig, error)
NewTierS3 returns a TierConfig of S3 type. Returns error if the given parameters are invalid like name is empty etc.
Example ¶
simpleS3SC, err := NewTierS3("simple-s3", "accessKey", "secretKey", "testbucket") if err != nil { log.Fatalln(err, "Failed to create s3 backed tier") } fmt.Println(simpleS3SC) fullyCustomS3SC, err := NewTierS3("custom-s3", "accessKey", "secretKey", "testbucket", S3Endpoint("https://s3.amazonaws.com"), S3Prefix("testprefix"), S3Region("us-west-1"), S3StorageClass("S3_IA")) if err != nil { log.Fatalln(err, "Failed to create s3 tier") } fmt.Println(fullyCustomS3SC)
Output:
func (*TierConfig) Bucket ¶
func (cfg *TierConfig) Bucket() string
Bucket returns the remote tier backend bucket.
func (*TierConfig) Clone ¶
func (cfg *TierConfig) Clone() TierConfig
Clone returns a copy of TierConfig with secret key/credentials redacted.
func (*TierConfig) DecodeMsg ¶
func (z *TierConfig) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*TierConfig) EncodeMsg ¶
func (z *TierConfig) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*TierConfig) Endpoint ¶
func (cfg *TierConfig) Endpoint() string
Endpoint returns the remote tier backend endpoint.
func (*TierConfig) MarshalMsg ¶
func (z *TierConfig) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*TierConfig) Msgsize ¶
func (z *TierConfig) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*TierConfig) Prefix ¶
func (cfg *TierConfig) Prefix() string
Prefix returns the remote tier backend prefix.
func (*TierConfig) Region ¶
func (cfg *TierConfig) Region() string
Region returns the remote tier backend region.
func (*TierConfig) UnmarshalJSON ¶
func (cfg *TierConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals json value to ensure that Type field is filled in correspondence with the tier config supplied. See TestUnmarshalTierConfig for an example json.
func (*TierConfig) UnmarshalMsg ¶
func (z *TierConfig) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type TierCreds ¶
type TierCreds struct { AccessKey string `json:"access,omitempty"` SecretKey string `json:"secret,omitempty"` CredsJSON []byte `json:"creds,omitempty"` AWSRole bool `json:"awsrole"` }
TierCreds is used to pass remote tier credentials in a tier-edit operation.
type TierGCS ¶
type TierGCS struct { Endpoint string `json:",omitempty"` // custom endpoint is not supported for GCS Creds string `json:",omitempty"` // base64 encoding of credentials.json Bucket string `json:",omitempty"` Prefix string `json:",omitempty"` Region string `json:",omitempty"` StorageClass string `json:",omitempty"` }
TierGCS represents the remote tier configuration for Google Cloud Storage
func (*TierGCS) GetCredentialJSON ¶
GetCredentialJSON method returns the credentials JSON bytes.
func (*TierGCS) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type TierInfo ¶
type TierInfo struct { Name string Type string Stats TierStats DailyStats DailyTierStats }
TierInfo contains tier name, type and statistics
type TierMinIO ¶
type TierMinIO struct { Endpoint string `json:",omitempty"` AccessKey string `json:",omitempty"` SecretKey string `json:",omitempty"` Bucket string `json:",omitempty"` Prefix string `json:",omitempty"` Region string `json:",omitempty"` }
TierMinIO represents the remote tier configuration for MinIO object storage backend.
func (*TierMinIO) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type TierS3 ¶
type TierS3 struct { Endpoint string `json:",omitempty"` AccessKey string `json:",omitempty"` SecretKey string `json:",omitempty"` Bucket string `json:",omitempty"` Prefix string `json:",omitempty"` Region string `json:",omitempty"` StorageClass string `json:",omitempty"` AWSRole bool `json:",omitempty"` }
TierS3 represents the remote tier configuration for AWS S3 compatible backend.
func (*TierS3) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type TierStats ¶
type TierStats struct { TotalSize uint64 `json:"totalSize"` NumVersions int `json:"numVersions"` NumObjects int `json:"numObjects"` }
TierStats contains per-tier statistics like total size, number of objects/versions transitioned, etc.
type TierType ¶
type TierType int
TierType enumerates different remote tier backends.
const ( // Unsupported refers to remote tier backend that is not supported in this version Unsupported TierType = iota // S3 refers to AWS S3 compatible backend S3 // Azure refers to Azure Blob Storage Azure // GCS refers to Google Cloud Storage GCS // MinIO refers to MinIO object storage backend MinIO )
func NewTierType ¶
NewTierType creates TierType if scType is a valid tier type string, otherwise returns an error.
func (TierType) MarshalJSON ¶
MarshalJSON returns the canonical json representation of tt.
func (TierType) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (TierType) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*TierType) UnmarshalJSON ¶
UnmarshalJSON parses the provided tier type string, failing unmarshal if data contains invalid tier type.
type TimeInfo ¶
type TimeInfo struct { CurrentTime time.Time `json:"current_time"` RoundtripDuration int32 `json:"roundtrip_duration"` }
TimeInfo contains current time in UTC, and the roundtrip duration when fetching it remotely
type TraceCallStats ¶
type TraceCallStats struct { InputBytes int `json:"inputbytes"` OutputBytes int `json:"outputbytes"` Latency time.Duration `json:"latency"` TimeToFirstByte time.Duration `json:"timetofirstbyte"` }
TraceCallStats records request stats
type TraceInfo ¶
type TraceInfo struct { TraceType TraceType `json:"type"` NodeName string `json:"nodename"` FuncName string `json:"funcname"` Time time.Time `json:"time"` ReqInfo TraceRequestInfo `json:"request"` RespInfo TraceResponseInfo `json:"response"` CallStats TraceCallStats `json:"stats"` StorageStats TraceStorageStats `json:"storageStats"` OSStats TraceOSStats `json:"osStats"` }
TraceInfo - represents a trace record, additionally also reports errors if any while listening on trace.
type TraceOSStats ¶
TraceOSStats statistics on operating system specific calls.
type TraceRequestInfo ¶
type TraceRequestInfo struct { Time time.Time `json:"time"` Proto string `json:"proto"` Method string `json:"method"` Path string `json:"path,omitempty"` RawQuery string `json:"rawquery,omitempty"` Headers http.Header `json:"headers,omitempty"` Body []byte `json:"body,omitempty"` Client string `json:"client"` }
TraceRequestInfo represents trace of http request
type TraceResponseInfo ¶
type TraceResponseInfo struct { Time time.Time `json:"time"` Headers http.Header `json:"headers,omitempty"` Body []byte `json:"body,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
TraceResponseInfo represents trace of http request
type TraceStorageStats ¶
type TraceStorageStats struct { Path string `json:"path"` Duration time.Duration `json:"duration"` }
TraceStorageStats statistics on MinIO Storage layer calls
type UpdateServiceAccountReq ¶
type UpdateServiceAccountReq struct { NewPolicy json.RawMessage `json:"newPolicy,omitempty"` // Parsed policy from iam/policy.Parse NewSecretKey string `json:"newSecretKey,omitempty"` NewStatus string `json:"newStatus,omityempty"` }
UpdateServiceAccountReq is the request options of the edit service account admin call
type UserDetail ¶
type UserDetail struct { CanonicalID string `json:"canonicalID"` Pgid int32 `json:"pgid"` Sgids []int32 `json:"sgid, omitempty"` Status AccountStatus `json:"status"` Uid int32 `json:"uid"` }
type UserInfo ¶
type UserInfo struct { SecretKey string `json:"secretKey,omitempty"` PolicyName string `json:"policyName,omitempty"` Status AccountStatus `json:"status"` MemberOf []string `json:"memberOf,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` }
UserInfo carries information about long term users.
Source Files ¶
- api-error-response.go
- api-log-entry.go
- api-log.go
- api.go
- auth.go
- bandwidth.go
- cluster-commands.go
- config-commands.go
- config-help-commands.go
- config-history-commands.go
- config-kv-commands.go
- cpu_linux.go
- decommission-commands.go
- encrypt.go
- group-commands.go
- heal-commands.go
- health-old.go
- health.go
- info-commands.go
- inspect.go
- kms-commands.go
- netperf.go
- no_fips.go
- parse-kv.go
- policy-commands.go
- profiling-commands.go
- quota-commands.go
- remote-target-commands.go
- retry.go
- service-commands.go
- speedtest.go
- speedtest_drive.go
- tier-azure.go
- tier-azure_gen.go
- tier-config.go
- tier-config_gen.go
- tier-gcs.go
- tier-gcs_gen.go
- tier-minio.go
- tier-minio_gen.go
- tier-s3.go
- tier-s3_gen.go
- tier.go
- top-commands.go
- trace.go
- transport.go
- update-commands.go
- user-commands.go
- utils.go