Documentation ¶
Overview ¶
Package cmd provides extended time.Duration implementation
Package cmd contains all the global variables and constants. ONLY TO BE ACCESSED VIA GET/SET FUNCTIONS.
Index ¶
- Constants
- Variables
- func DownloadReleaseData(customReleaseURL string, timeout time.Duration) (data string, err *probe.Error)
- func GetCurrentReleaseTime() (releaseTime time.Time, err *probe.Error)
- func IsDCOS() bool
- func IsDeleteEvent(event notify.Event) bool
- func IsDocker() bool
- func IsGetEvent(event notify.Event) bool
- func IsKubernetes() bool
- func IsPutEvent(event notify.Event) bool
- func IsSourceBuild() bool
- func Main(args []string) error
- func NewAdminFactory() func(config *Config) (*madmin.AdminClient, *probe.Error)
- func ParseForm(r *http.Request) error
- func PipeChan(capacity int) (inputCh, outputCh chan notify.EventInfo)
- func SubnetBaseURL() string
- func SubnetLicenseAuthHeaders(lic string) map[string]string
- func SubnetPostReq(reqURL string, payload interface{}, headers map[string]string) (string, error)
- func SubnetRegisterURL() string
- func SubnetUploadURL(uploadType string) string
- func TarGZHealthInfo(healthInfo interface{}, version string) ([]byte, error)
- func UTCNow() time.Time
- type APINotImplemented
- type BrokenSymlink
- type BucketDoesNotExist
- type BucketExists
- type BucketInfo
- type BucketInvalid
- type BucketNameEmpty
- type BucketStatOptions
- type Client
- type ClientContent
- type ClientResult
- type ClientURL
- type ClientURLType
- type ClusterHealthV1
- type ClusterInfo
- type ClusterRegistrationInfo
- type ClusterRegistrationReq
- type Config
- type ConfigAnyVersion
- type CopyOptions
- type DirOpt
- type DriveTestResult
- type DriveTestResults
- type Duration
- type EmptyPath
- type EndPointStats
- type EventInfo
- type Field
- type GenericBucketError
- type GenericFileError
- type GetOptions
- type Health
- type HealthDataTypeFlag
- type HealthDataTypeSlice
- type HealthReportHeader
- type HealthReportInfo
- type HwCPUV1
- type HwDrivePerfV1
- type HwDriveV1
- type HwMemV1
- type HwNetPerfV1
- type HwPerfV1
- type HwServerV1
- type HwServersV1
- type InvalidArgument
- type ListOptions
- type MinioHealthInfoV1
- type NetStats
- type NetTestResult
- type NetTestResults
- type NotificationConfig
- type ObjGETPerfResults
- type ObjGETStats
- type ObjPUTPerfResults
- type ObjPUTStats
- type ObjStatServer
- type ObjStats
- type ObjTestResults
- type ObjectAlreadyExists
- type ObjectAlreadyExistsAsDirectory
- type ObjectIsDeleteMarker
- type ObjectMissing
- type ObjectNameEmpty
- type ObjectOnGlacier
- type ParallelManager
- type PathInsufficientPermission
- type PathIsNotRegular
- type PathNotADirectory
- type PathNotFound
- type PerfTestOutput
- type PerfTestResult
- type PerfTestType
- type PingResult
- type PrettyRecord
- type PrettyTable
- type Progress
- type ProgressReader
- type ProgressStatus
- func (ps *ProgressStatus) Add(v int64) Status
- func (ps *ProgressStatus) AddCounts(v int64)
- func (ps *ProgressStatus) Finish()
- func (ps *ProgressStatus) Get() int64
- func (ps *ProgressStatus) GetCounts() int64
- func (ps *ProgressStatus) PrintMsg(_ message)
- func (ps *ProgressStatus) Println(data ...interface{})
- func (ps *ProgressStatus) Read(p []byte) (n int, err error)
- func (p ProgressStatus) Set64(length int64) *progressBar
- func (ps *ProgressStatus) SetCaption(s string)
- func (ps *ProgressStatus) SetCounts(v int64)
- func (ps *ProgressStatus) SetTotal(v int64) Status
- func (ps *ProgressStatus) Start()
- func (ps *ProgressStatus) Total() int64
- func (ps *ProgressStatus) Update()
- type PrometheusConfig
- type PutOptions
- type QuietStatus
- func (qs *QuietStatus) Add(v int64) Status
- func (qs *QuietStatus) AddCounts(v int64)
- func (qs *QuietStatus) Finish()
- func (qs *QuietStatus) Get() int64
- func (qs *QuietStatus) GetCounts() int64
- func (qs *QuietStatus) PrintMsg(msg message)
- func (qs *QuietStatus) Println(_ ...interface{})
- func (qs *QuietStatus) Read(p []byte) (n int, err error)
- func (a QuietStatus) Set(n int64) *accounter
- func (qs *QuietStatus) SetCaption(_ string)
- func (qs *QuietStatus) SetCounts(v int64)
- func (qs *QuietStatus) SetTotal(v int64) Status
- func (qs *QuietStatus) Start()
- func (a QuietStatus) Stat() accountStat
- func (qs *QuietStatus) Total() int64
- func (qs *QuietStatus) Update()
- type RemoveResult
- type Row
- type S3Client
- func (c *S3Client) AddNotificationConfig(ctx context.Context, arn string, events []string, prefix, suffix string, ...) *probe.Error
- func (c *S3Client) AddUserAgent(app, version string)
- func (c *S3Client) Copy(ctx context.Context, source string, opts CopyOptions, progress io.Reader) *probe.Error
- func (c *S3Client) DeleteBucketCors(ctx context.Context) *probe.Error
- func (c *S3Client) DeleteEncryption(ctx context.Context) *probe.Error
- func (c *S3Client) DeleteTags(ctx context.Context, versionID string) *probe.Error
- func (c *S3Client) Get(ctx context.Context, opts GetOptions) (io.ReadCloser, *ClientContent, *probe.Error)
- func (c *S3Client) GetAccess(ctx context.Context) (string, string, *probe.Error)
- func (c *S3Client) GetAccessRules(ctx context.Context) (map[string]string, *probe.Error)
- func (c *S3Client) GetBucketCors(ctx context.Context) (*cors.Config, *probe.Error)
- func (c *S3Client) GetBucketInfo(ctx context.Context) (BucketInfo, *probe.Error)
- func (c *S3Client) GetEncryption(ctx context.Context) (algorithm, keyID string, err *probe.Error)
- func (c *S3Client) GetLifecycle(ctx context.Context) (*lifecycle.Configuration, time.Time, *probe.Error)
- func (c *S3Client) GetObjectLegalHold(ctx context.Context, versionID string) (minio.LegalHoldStatus, *probe.Error)
- func (c *S3Client) GetObjectLockConfig(ctx context.Context) (string, minio.RetentionMode, uint64, minio.ValidityUnit, *probe.Error)
- func (c *S3Client) GetObjectRetention(ctx context.Context, versionID string) (minio.RetentionMode, time.Time, *probe.Error)
- func (c *S3Client) GetPart(ctx context.Context, part int) (io.ReadCloser, *probe.Error)
- func (c *S3Client) GetReplication(ctx context.Context) (replication.Config, *probe.Error)
- func (c *S3Client) GetReplicationMetrics(ctx context.Context) (replication.MetricsV2, *probe.Error)
- func (c *S3Client) GetTags(ctx context.Context, versionID string) (map[string]string, *probe.Error)
- func (c *S3Client) GetURL() ClientURL
- func (c *S3Client) GetVersion(ctx context.Context) (config minio.BucketVersioningConfiguration, err *probe.Error)
- func (c *S3Client) List(ctx context.Context, opts ListOptions) <-chan *ClientContent
- func (c *S3Client) ListBuckets(ctx context.Context) ([]*ClientContent, *probe.Error)
- func (c *S3Client) ListNotificationConfigs(ctx context.Context, arn string) ([]NotificationConfig, *probe.Error)
- func (c *S3Client) MakeBucket(ctx context.Context, region string, ignoreExisting, withLock bool) *probe.Error
- func (c *S3Client) Put(ctx context.Context, reader io.Reader, size int64, progress io.Reader, ...) (int64, *probe.Error)
- func (c *S3Client) PutObjectLegalHold(ctx context.Context, versionID string, lhold minio.LegalHoldStatus) *probe.Error
- func (c *S3Client) PutObjectRetention(ctx context.Context, versionID string, mode minio.RetentionMode, ...) *probe.Error
- func (c *S3Client) PutPart(ctx context.Context, reader io.Reader, size int64, progress io.Reader, ...) (int64, *probe.Error)
- func (c *S3Client) Remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass, isForceDel bool, ...) <-chan RemoveResult
- func (c *S3Client) RemoveBucket(ctx context.Context, forceRemove bool) *probe.Error
- func (c *S3Client) RemoveNotificationConfig(ctx context.Context, arn, event, prefix, suffix string) *probe.Error
- func (c *S3Client) RemoveReplication(ctx context.Context) *probe.Error
- func (c *S3Client) ReplicationResyncStatus(ctx context.Context, arn string) (rinfo replication.ResyncTargetsInfo, err *probe.Error)
- func (c *S3Client) ResetReplication(ctx context.Context, before time.Duration, tgtArn string) (rinfo replication.ResyncTargetsInfo, err *probe.Error)
- func (c *S3Client) Restore(ctx context.Context, versionID string, days int) *probe.Error
- func (c *S3Client) Select(ctx context.Context, expression string, sse encrypt.ServerSide, ...) (io.ReadCloser, *probe.Error)
- func (c *S3Client) SetAccess(ctx context.Context, bucketPolicy string, isJSON bool) *probe.Error
- func (c *S3Client) SetBucketCors(ctx context.Context, corsXML []byte) *probe.Error
- func (c *S3Client) SetEncryption(ctx context.Context, encType, kmsKeyID string) *probe.Error
- func (c *S3Client) SetLifecycle(ctx context.Context, config *lifecycle.Configuration) *probe.Error
- func (c *S3Client) SetObjectLockConfig(ctx context.Context, mode minio.RetentionMode, validity uint64, ...) *probe.Error
- func (c *S3Client) SetReplication(ctx context.Context, cfg *replication.Config, opts replication.Options) *probe.Error
- func (c *S3Client) SetTags(ctx context.Context, versionID, tagString string) *probe.Error
- func (c *S3Client) SetVersion(ctx context.Context, status string, prefixes []string, excludeFolders bool) *probe.Error
- func (c *S3Client) ShareDownload(ctx context.Context, versionID string, expires time.Duration) (string, *probe.Error)
- func (c *S3Client) ShareUpload(ctx context.Context, isRecursive bool, expires time.Duration, ...) (string, map[string]string, *probe.Error)
- func (c *S3Client) Stat(ctx context.Context, opts StatOptions) (*ClientContent, *probe.Error)
- func (c *S3Client) Watch(ctx context.Context, options WatchOptions) (*WatchObject, *probe.Error)
- type SameFile
- type SchemaVersion
- type ScrapeConfig
- type SelectObjectOpts
- type SiteNetStats
- type SiteReplicationTestNodeResult
- type SiteReplicationTestResults
- type StatConfig
- type StatOptions
- type Status
- type SubnetFileUploader
- type SubnetHeaders
- type SubnetLoginReq
- type SubnetMFAReq
- type SwInfoV1
- type TooManyLevelsSymlink
- type URLs
- type UnexpectedEOF
- type UnexpectedExcessRead
- type UnexpectedShortWrite
- type WatchObject
- type WatchOptions
- type Watcher
Constants ¶
const ( // AmzObjectLockMode sets object lock mode AmzObjectLockMode = "X-Amz-Object-Lock-Mode" // AmzObjectLockRetainUntilDate sets object lock retain until date AmzObjectLockRetainUntilDate = "X-Amz-Object-Lock-Retain-Until-Date" // AmzObjectLockLegalHold sets object lock legal hold AmzObjectLockLegalHold = "X-Amz-Object-Lock-Legal-Hold" )
const HelpTmpl = `` /* 464-byte string literal not displayed */
HelpTmpl template used by all sub-systems
const History = `{{range .}}{{colorYellowBold "RestoreId:"}} {{colorYellowBold .RestoreID}}
Date: {{.CreateTime}}
{{.Targets}}
{{end}}`
History template used by all sub-systems
const Ping = `` /* 986-byte string literal not displayed */
Ping is the template for ping result
const PingDist = `` /* 987-byte string literal not displayed */
PingDist is the template for ping result in distributed mode
Variables ¶
var ( // Version - version time.RFC3339. Version = "DEVELOPMENT.GOGET" // ReleaseTag - release tag in TAG.%Y-%m-%dT%H-%M-%SZ. ReleaseTag = "DEVELOPMENT.GOGET" // CommitID - latest commit id. CommitID = "DEVELOPMENT.GOGET" // ShortCommitID - first 12 characters from CommitID. ShortCommitID = CommitID[:12] // CopyrightYear - dynamic value of the copyright end year CopyrightYear = "0000" )
var ( // EventTypePut contains the notify events that will cause a put (write) EventTypePut = []notify.Event{notify.InCloseWrite | notify.InMovedTo} // EventTypeDelete contains the notify events that will cause a delete (remove) EventTypeDelete = []notify.Event{notify.InDelete | notify.InDeleteSelf | notify.InMovedFrom} // EventTypeGet contains the notify events that will cause a get (read) EventTypeGet = []notify.Event{notify.InAccess | notify.InOpen} )
var ( Nanosecond = Duration(time.Nanosecond) Microsecond = Duration(time.Microsecond) Millisecond = Duration(time.Millisecond) Second = Duration(time.Second) Minute = Duration(time.Minute) Hour = Duration(time.Hour) Day = Hour * 24 Week = Day * 7 Fortnight = Week * 2 Month = Day * 30 // Approximation Year = Day * 365 // Approximation Decade = Year * 10 // Approximation Century = Year * 100 // Approximation Millennium = Year * 1000 // Approximation )
Standard unit of time.
var ( // GlobalDevMode is set to true if the program is running in development mode GlobalDevMode = false // GlobalSubnetProxyURL is the proxy to be used for communication with subnet GlobalSubnetProxyURL *url.URL )
var ErrInvalidFileSystemAttribute = errors.New("Error in parsing file system attribute")
ErrInvalidFileSystemAttribute reflects invalid fily system attribute
var ErrInvalidMetadata = errors.New("specified metadata should be of form key1=value1;key2=value2;... and so on")
ErrInvalidMetadata reflects invalid metadata format
var HelpEnvTemplate = template.Must(template.New("config-help-env").Funcs(funcMap).Parse(HelpTmpl))
HelpEnvTemplate - captures config help template
var HelpTemplate = template.Must(template.New("config-help").Funcs(funcMap).Parse(HelpTmpl))
HelpTemplate - captures config help template
var HistoryTemplate = template.Must(template.New("history-list").Funcs(funcMap).Parse(History))
HistoryTemplate - captures history list template
PingTemplate - captures ping template
var PingTemplateDist = template.Must(template.New("ping-list").Funcs(colorMap).Parse(PingDist))
PingTemplateDist - captures ping template
var S3New = newFactory()
S3New returns an initialized S3Client structure. If debug is enabled, it also enables an internal trace transport.
Functions ¶
func DownloadReleaseData ¶
func DownloadReleaseData(customReleaseURL string, timeout time.Duration) (data string, err *probe.Error)
DownloadReleaseData - downloads release data from mc official server.
func GetCurrentReleaseTime ¶
GetCurrentReleaseTime - returns this process's release time. If it is official mc --version, parsed version is returned else mc binary's mod time is returned.
func IsDeleteEvent ¶
IsDeleteEvent checks if the event returned is a delete event
func IsDocker ¶
func IsDocker() bool
IsDocker - returns if the environment mc is running in docker or not. The check is a simple file existence check.
https://github.com/moby/moby/blob/master/daemon/initlayer/setup_unix.go#L25
"/.dockerenv": "file",
func IsGetEvent ¶
IsGetEvent checks if the event return is a get event.
func IsKubernetes ¶
func IsKubernetes() bool
IsKubernetes returns true if MinIO is running in kubernetes.
func IsPutEvent ¶
IsPutEvent checks if the event returned is a put event
func IsSourceBuild ¶
func IsSourceBuild() bool
IsSourceBuild - returns if this binary is a non-official build from source code.
func NewAdminFactory ¶
NewAdminFactory encloses New function with client cache.
func SubnetLicenseAuthHeaders ¶
SubnetLicenseAuthHeaders - returns the headers for SUBNET license authentication
func SubnetPostReq ¶
SubnetPostReq - makes a POST request to SUBNET
func SubnetRegisterURL ¶
func SubnetRegisterURL() string
SubnetRegisterURL - returns the cluster registration URL
func SubnetUploadURL ¶
SubnetUploadURL - returns the upload URL for the given upload type
func TarGZHealthInfo ¶
TarGZHealthInfo - compress and tar MinIO diagnostics output
Types ¶
type APINotImplemented ¶
APINotImplemented - api not implemented
func (APINotImplemented) Error ¶
func (e APINotImplemented) Error() string
type BrokenSymlink ¶
type BrokenSymlink GenericFileError
BrokenSymlink (ENOTENT) - file has broken symlink.
func (BrokenSymlink) Error ¶
func (e BrokenSymlink) Error() string
type BucketDoesNotExist ¶
type BucketDoesNotExist GenericBucketError
BucketDoesNotExist - bucket does not exist.
func (BucketDoesNotExist) Error ¶
func (e BucketDoesNotExist) Error() string
type BucketExists ¶
type BucketExists GenericBucketError
BucketExists - bucket exists.
func (BucketExists) Error ¶
func (e BucketExists) Error() string
type BucketInfo ¶
type BucketInfo struct { URL ClientURL `json:"-"` Key string `json:"name"` Date time.Time `json:"lastModified"` Size int64 `json:"size"` Type os.FileMode `json:"-"` Prefix bool `json:"-"` Versioning struct { Status string `json:"status"` MFADelete string `json:"MFADelete"` } `json:"Versioning,omitempty"` Encryption struct { Algorithm string `json:"algorithm,omitempty"` KeyID string `json:"keyId,omitempty"` } `json:"Encryption,omitempty"` Locking struct { Enabled string `json:"enabled"` Mode minio.RetentionMode `json:"mode"` Validity string `json:"validity"` } `json:"ObjectLock,omitempty"` Replication struct { Enabled bool `json:"enabled"` Config replication.Config `json:"config,omitempty"` } `json:"Replication"` Policy struct { Type string `json:"type"` Text string `json:"policy,omitempty"` } `json:"Policy,omitempty"` Location string `json:"location"` Tagging map[string]string `json:"tagging,omitempty"` ILM struct { Config *lifecycle.Configuration `json:"config,omitempty"` } `json:"ilm,omitempty"` Notification struct { Config notification.Configuration `json:"config,omitempty"` } `json:"notification,omitempty"` }
BucketInfo holds info about a bucket
type BucketInvalid ¶
type BucketInvalid struct {
Bucket string
}
BucketInvalid - bucket name invalid.
func (BucketInvalid) Error ¶
func (e BucketInvalid) Error() string
type BucketNameEmpty ¶
type BucketNameEmpty struct{}
BucketNameEmpty - bucket name empty (http://goo.gl/wJlzDz)
func (BucketNameEmpty) Error ¶
func (e BucketNameEmpty) Error() string
type BucketStatOptions ¶
type BucketStatOptions struct {
// contains filtered or unexported fields
}
BucketStatOptions - bucket stat.
type Client ¶
type Client interface { // Common operations Stat(ctx context.Context, opts StatOptions) (content *ClientContent, err *probe.Error) List(ctx context.Context, opts ListOptions) <-chan *ClientContent // Bucket operations MakeBucket(ctx context.Context, region string, ignoreExisting, withLock bool) *probe.Error RemoveBucket(ctx context.Context, forceRemove bool) *probe.Error ListBuckets(ctx context.Context) ([]*ClientContent, *probe.Error) // Object lock config SetObjectLockConfig(ctx context.Context, mode minio.RetentionMode, validity uint64, unit minio.ValidityUnit) *probe.Error GetObjectLockConfig(ctx context.Context) (status string, mode minio.RetentionMode, validity uint64, unit minio.ValidityUnit, perr *probe.Error) // Access policy operations. GetAccess(ctx context.Context) (access, policyJSON string, err *probe.Error) GetAccessRules(ctx context.Context) (policyRules map[string]string, err *probe.Error) SetAccess(ctx context.Context, access string, isJSON bool) *probe.Error // I/O operations Copy(ctx context.Context, source string, opts CopyOptions, progress io.Reader) *probe.Error // Runs select expression on object storage on specific files. Select(ctx context.Context, expression string, sse encrypt.ServerSide, opts SelectObjectOpts) (io.ReadCloser, *probe.Error) // I/O operations with metadata. Get(ctx context.Context, opts GetOptions) (reader io.ReadCloser, content *ClientContent, err *probe.Error) Put(ctx context.Context, reader io.Reader, size int64, progress io.Reader, opts PutOptions) (n int64, err *probe.Error) // Object Locking related API PutObjectRetention(ctx context.Context, versionID string, mode minio.RetentionMode, retainUntilDate time.Time, bypassGovernance bool) *probe.Error GetObjectRetention(ctx context.Context, versionID string) (minio.RetentionMode, time.Time, *probe.Error) PutObjectLegalHold(ctx context.Context, versionID string, hold minio.LegalHoldStatus) *probe.Error GetObjectLegalHold(ctx context.Context, versionID string) (minio.LegalHoldStatus, *probe.Error) // I/O operations with expiration // Watch events Watch(ctx context.Context, options WatchOptions) (*WatchObject, *probe.Error) // Delete operations Remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass, isForceDel bool, contentCh <-chan *ClientContent) (errorCh <-chan RemoveResult) // GetURL returns back internal url GetURL() ClientURL AddUserAgent(app, version string) // Tagging operations GetTags(ctx context.Context, versionID string) (map[string]string, *probe.Error) SetTags(ctx context.Context, versionID, tags string) *probe.Error DeleteTags(ctx context.Context, versionID string) *probe.Error // Lifecycle operations GetLifecycle(ctx context.Context) (*lifecycle.Configuration, time.Time, *probe.Error) SetLifecycle(ctx context.Context, config *lifecycle.Configuration) *probe.Error // Versioning operations GetVersion(ctx context.Context) (minio.BucketVersioningConfiguration, *probe.Error) SetVersion(ctx context.Context, status string, prefixes []string, excludeFolders bool) *probe.Error // Replication operations GetReplication(ctx context.Context) (replication.Config, *probe.Error) SetReplication(ctx context.Context, cfg *replication.Config, opts replication.Options) *probe.Error RemoveReplication(ctx context.Context) *probe.Error GetReplicationMetrics(ctx context.Context) (replication.MetricsV2, *probe.Error) ResetReplication(ctx context.Context, before time.Duration, arn string) (replication.ResyncTargetsInfo, *probe.Error) ReplicationResyncStatus(ctx context.Context, arn string) (rinfo replication.ResyncTargetsInfo, err *probe.Error) // Encryption operations GetEncryption(ctx context.Context) (string, string, *probe.Error) SetEncryption(ctx context.Context, algorithm, kmsKeyID string) *probe.Error DeleteEncryption(ctx context.Context) *probe.Error // Bucket info operation GetBucketInfo(ctx context.Context) (BucketInfo, *probe.Error) // Restore an object Restore(ctx context.Context, versionID string, days int) *probe.Error // OD operations GetPart(ctx context.Context, part int) (io.ReadCloser, *probe.Error) PutPart(ctx context.Context, reader io.Reader, size int64, progress io.Reader, opts PutOptions) (n int64, err *probe.Error) // Cors operations GetBucketCors(ctx context.Context) (*cors.Config, *probe.Error) SetBucketCors(ctx context.Context, corsXML []byte) *probe.Error DeleteBucketCors(ctx context.Context) *probe.Error }
Client - client interface
type ClientContent ¶
type ClientContent struct { URL ClientURL BucketName string // only valid and set for client-type objectStorage Time time.Time Size int64 Type os.FileMode StorageClass string Metadata map[string]string Tags map[string]string UserMetadata map[string]string Checksum map[string]string ETag string Expires time.Time Expiration time.Time ExpirationRuleID string RetentionEnabled bool RetentionMode string RetentionDuration string BypassGovernance bool LegalHoldEnabled bool LegalHold string VersionID string IsDeleteMarker bool IsLatest bool ReplicationStatus string Restore *minio.RestoreInfo Err *probe.Error }
ClientContent - Content container for content metadata
type ClientResult ¶
type ClientResult struct { BytesSent uint64 `json:"bytesSent"` TimeSpent int64 `json:"timeSpent"` Endpoint string `json:"endpoint"` Error string `json:"error"` }
ClientResult - result of the network from client to server
type ClientURL ¶
type ClientURL struct { Type ClientURLType Scheme string Host string Path string SchemeSeparator string Separator rune }
ClientURL url client url structure
type ClusterHealthV1 ¶
type ClusterHealthV1 struct { TimeStamp time.Time `json:"timestamp,omitempty"` Status string `json:"status"` Error string `json:"error,omitempty"` Hardware HwServersV1 `json:"hardware,omitempty"` Software SwInfoV1 `json:"software,omitempty"` }
ClusterHealthV1 - main struct of the health report
func MapHealthInfoToV1 ¶
func MapHealthInfoToV1(healthInfo madmin.HealthInfoV0, err error) ClusterHealthV1
MapHealthInfoToV1 - maps the health info returned by minio server to V1 format
func (ClusterHealthV1) GetError ¶
func (ch ClusterHealthV1) GetError() string
GetError - return error from the health info
func (ClusterHealthV1) GetStatus ¶
func (ch ClusterHealthV1) GetStatus() string
GetStatus - return status of the health info
func (ClusterHealthV1) GetTimestamp ¶
func (ch ClusterHealthV1) GetTimestamp() time.Time
GetTimestamp - return timestamp from the health info
func (ClusterHealthV1) JSON ¶
func (ch ClusterHealthV1) JSON() string
JSON jsonifies service status message.
func (ClusterHealthV1) String ¶
func (ch ClusterHealthV1) String() string
type ClusterInfo ¶
type ClusterInfo struct { MinioVersion string `json:"minio_version"` NoOfServerPools int `json:"no_of_server_pools"` NoOfServers int `json:"no_of_servers"` NoOfDrives int `json:"no_of_drives"` NoOfBuckets uint64 `json:"no_of_buckets"` NoOfObjects uint64 `json:"no_of_objects"` TotalDriveSpace uint64 `json:"total_drive_space"` UsedDriveSpace uint64 `json:"used_drive_space"` }
ClusterInfo - The "info" sub-node of the cluster registration information struct Intended to be extensible i.e. more fields will be added as and when required
type ClusterRegistrationInfo ¶
type ClusterRegistrationInfo struct { DeploymentID string `json:"deployment_id"` ClusterName string `json:"cluster_name"` UsedCapacity uint64 `json:"used_capacity"` Info ClusterInfo `json:"info"` }
ClusterRegistrationInfo - Information stored in the cluster registration token
func GetClusterRegInfo ¶
func GetClusterRegInfo(admInfo madmin.InfoMessage, clusterName string) ClusterRegistrationInfo
GetClusterRegInfo - returns the cluster registration info
type ClusterRegistrationReq ¶
type ClusterRegistrationReq struct {
Token string `json:"token"`
}
ClusterRegistrationReq - JSON payload of the subnet api for cluster registration Contains a registration token created by base64 encoding of the registration info
type Config ¶
type Config struct { Alias string AccessKey string SecretKey string SessionToken string Signature string HostURL string AppName string AppVersion string Debug bool Insecure bool Lookup minio.BucketLookupType ConnReadDeadline time.Duration ConnWriteDeadline time.Duration UploadLimit int64 DownloadLimit int64 Transport http.RoundTripper }
Config - see http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html
func BuildS3Config ¶
func BuildS3Config(ctx context.Context, alias, url, accessKey, secretKey, api, path string, peerCert *x509.Certificate) (*Config, *probe.Error)
BuildS3Config constructs an S3 Config and does signature auto-probe when needed.
func NewS3Config ¶
NewS3Config simply creates a new Config struct using the passed parameters.
type ConfigAnyVersion ¶
type ConfigAnyVersion struct {
Version string
}
ConfigAnyVersion is a generic structure to parse any config.json version file and only extracts its version number
type CopyOptions ¶
type CopyOptions struct {
// contains filtered or unexported fields
}
CopyOptions holds options for copying operation
type DriveTestResult ¶
type DriveTestResult struct { Endpoint string `json:"endpoint"` Perf []madmin.DrivePerf `json:"perf,omitempty"` Error string `json:"error,omitempty"` }
DriveTestResult - result of the drive performance test on a given endpoint
type DriveTestResults ¶
type DriveTestResults struct {
Results []DriveTestResult `json:"servers"`
}
DriveTestResults - results of drive performance test across all endpoints
type Duration ¶
Duration is a standard unit of time.
func ParseDuration ¶
ParseDuration parses a duration string. This implementation is similar to Go's https://cs.opensource.google/go/go/+/refs/tags/go1.18.3:src/time/format.go;l=1546;bpv=1;bpt=1 extends it to parse days, weeks and years..
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h", "d", "w", "y".
type EndPointStats ¶
type EndPointStats struct { Endpoint *url.URL `json:"endpoint"` Min string `json:"min"` Max string `json:"max"` Average string `json:"average"` DNS string `json:"dns"` CountErr string `json:"error-count,omitempty"` Error string `json:"error,omitempty"` Roundtrip string `json:"roundtrip"` }
EndPointStats - container to hold server ping stats
type EventInfo ¶
type EventInfo struct { Time string Size int64 UserMetadata map[string]string Path string Host string Port string UserAgent string Type notification.EventType }
EventInfo contains the information of the event that occurred and the source IP:PORT of the client which triggerred the event.
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field configuration: color theme and max content length
type GenericBucketError ¶
type GenericBucketError struct {
Bucket string
}
GenericBucketError - generic bucket operations error
type GenericFileError ¶
type GenericFileError struct {
Path string
}
GenericFileError - generic file error.
type GetOptions ¶
type GetOptions struct { SSE encrypt.ServerSide VersionID string Zip bool RangeStart int64 PartNumber int Preserve bool }
GetOptions holds options of the GET operation
type Health ¶
type Health struct {
Health SchemaVersion `json:"health"`
}
Health - intermediate struct for subnet health header Just used to achieve the JSON structure we want
type HealthDataTypeFlag ¶
type HealthDataTypeFlag struct { Name string Usage string EnvVar string Hidden bool Value *HealthDataTypeSlice }
HealthDataTypeFlag is a typed flag to represent health datatypes
func (HealthDataTypeFlag) Apply ¶
func (f HealthDataTypeFlag) Apply(set *flag.FlagSet)
Apply - applies the flag
func (HealthDataTypeFlag) ApplyWithError ¶
func (f HealthDataTypeFlag) ApplyWithError(set *flag.FlagSet) error
ApplyWithError - applies with error
func (HealthDataTypeFlag) GetName ¶
func (f HealthDataTypeFlag) GetName() string
GetName - returns the name of the flag
func (HealthDataTypeFlag) String ¶
func (f HealthDataTypeFlag) String() string
String - returns the string to be shown in the help message
type HealthDataTypeSlice ¶
type HealthDataTypeSlice []madmin.HealthDataType
HealthDataTypeSlice is a typed list of health tests
func GetGlobalHealthDataTypeSlice ¶
func GetGlobalHealthDataTypeSlice(c *cli.Context, name string) *HealthDataTypeSlice
GetGlobalHealthDataTypeSlice - returns the list of set health tests set globally
func GetHealthDataTypeSlice ¶
func GetHealthDataTypeSlice(c *cli.Context, name string) *HealthDataTypeSlice
GetHealthDataTypeSlice - returns the list of set health tests
func (*HealthDataTypeSlice) Get ¶
func (d *HealthDataTypeSlice) Get() interface{}
Get - returns the value
func (*HealthDataTypeSlice) Set ¶
func (d *HealthDataTypeSlice) Set(value string) error
Set - sets the flag to the given value
func (*HealthDataTypeSlice) String ¶
func (d *HealthDataTypeSlice) String() string
String - returns the string representation of the health datatypes
func (*HealthDataTypeSlice) Value ¶
func (d *HealthDataTypeSlice) Value() []madmin.HealthDataType
Value - returns the value
type HealthReportHeader ¶
type HealthReportHeader struct {
Subnet Health `json:"subnet"`
}
HealthReportHeader - Header of the subnet health report expected to generate JSON output of the form {"subnet":{"health":{"version":"v1"}}}
type HealthReportInfo ¶
type HealthReportInfo interface { GetTimestamp() time.Time GetStatus() string GetError() string // contains filtered or unexported methods }
HealthReportInfo - interface to be implemented by health report schema struct
type HwCPUV1 ¶
type HwCPUV1 struct { CPUStat []cpu.InfoStat `json:"cpu,omitempty"` TimesStat []cpu.TimesStat `json:"time,omitempty"` Error string `json:"error,omitempty"` }
HwCPUV1 - CPU Info
type HwDrivePerfV1 ¶
type HwDrivePerfV1 struct { Serial []madmin.DrivePerfInfoV0 `json:"serial,omitempty"` Parallel []madmin.DrivePerfInfoV0 `json:"parallel,omitempty"` Error string `json:"error,omitempty"` }
HwDrivePerfV1 - Network performance info
type HwDriveV1 ¶
type HwDriveV1 struct { Counters map[string]disk.IOCountersStat `json:"counters,omitempty"` Partitions []madmin.PartitionStat `json:"partitions,omitempty"` Usage []*disk.UsageStat `json:"usage,omitempty"` Error string `json:"error,omitempty"` }
HwDriveV1 - Drive info
type HwMemV1 ¶
type HwMemV1 struct { SwapMem *mem.SwapMemoryStat `json:"swap,omitempty"` VirtualMem *mem.VirtualMemoryStat `json:"virtualmem,omitempty"` Error string `json:"error,omitempty"` }
HwMemV1 - Includes host virtual and swap mem information
type HwNetPerfV1 ¶
type HwNetPerfV1 struct { Serial []madmin.NetPerfInfoV0 `json:"serial,omitempty"` Parallel []madmin.NetPerfInfoV0 `json:"parallel,omitempty"` }
HwNetPerfV1 - Network performance info
type HwPerfV1 ¶
type HwPerfV1 struct { Net HwNetPerfV1 `json:"net,omitempty"` Drive HwDrivePerfV1 `json:"drives,omitempty"` }
HwPerfV1 - hardware performance
type HwServerV1 ¶
type HwServerV1 struct { Addr string `json:"addr"` CPUs []HwCPUV1 `json:"cpus,omitempty"` Drives []HwDriveV1 `json:"drives,omitempty"` MemInfo HwMemV1 `json:"meminfo,omitempty"` Perf HwPerfV1 `json:"perf,omitempty"` }
HwServerV1 - server health Info
type HwServersV1 ¶
type HwServersV1 struct {
Servers []HwServerV1 `json:"servers,omitempty"`
}
HwServersV1 - hardware health Info
type InvalidArgument ¶
type InvalidArgument struct{}
InvalidArgument - passed argument is invalid for this operation
func (InvalidArgument) Error ¶
func (e InvalidArgument) Error() string
type ListOptions ¶
type ListOptions struct { Recursive bool Incomplete bool WithMetadata bool WithOlderVersions bool WithDeleteMarkers bool ListZip bool TimeRef time.Time ShowDir DirOpt Count int }
ListOptions holds options for listing operation
type MinioHealthInfoV1 ¶
type MinioHealthInfoV1 struct { Info madmin.InfoMessage `json:"info,omitempty"` Config interface{} `json:"config,omitempty"` ProcInfo []madmin.ServerProcInfo `json:"procinfos,omitempty"` Error string `json:"error,omitempty"` }
MinioHealthInfoV1 - Health info of the MinIO cluster
type NetTestResult ¶
type NetTestResult struct { Endpoint string `json:"endpoint"` Perf NetStats `json:"perf"` Error string `json:"error,omitempty"` }
NetTestResult - result of the network performance test for given endpoint
type NetTestResults ¶
type NetTestResults struct {
Results []NetTestResult `json:"servers"`
}
NetTestResults - result of the network performance test across all endpoints
type NotificationConfig ¶
type NotificationConfig struct { ID string `json:"id"` Arn string `json:"arn"` Events []string `json:"events"` Prefix string `json:"prefix"` Suffix string `json:"suffix"` }
NotificationConfig notification config
type ObjGETPerfResults ¶
type ObjGETPerfResults struct { Perf ObjGETStats `json:"perf"` Servers []ObjStatServer `json:"servers"` }
ObjGETPerfResults - Object GET performance results
type ObjGETStats ¶
type ObjGETStats struct { ObjPUTStats TTFB madmin.Timings `json:"ttfb,omitempty"` }
ObjGETStats - GET stats of all the servers
type ObjPUTPerfResults ¶
type ObjPUTPerfResults struct { Perf ObjPUTStats `json:"perf"` Servers []ObjStatServer `json:"servers"` }
ObjPUTPerfResults - Object PUT performance results
type ObjPUTStats ¶
type ObjPUTStats struct { Throughput uint64 `json:"throughput"` ObjectsPerSec uint64 `json:"objectsPerSec"` Response madmin.Timings `json:"responseTime"` }
ObjPUTStats - PUT stats of all the servers
type ObjStatServer ¶
type ObjStatServer struct { Endpoint string `json:"endpoint"` Perf ObjStats `json:"perf"` Error string `json:"error,omitempty"` }
ObjStatServer - Server level object performance stats
type ObjStats ¶
type ObjStats struct { Throughput uint64 `json:"throughput"` ObjectsPerSec uint64 `json:"objectsPerSec"` }
ObjStats - Object performance stats
type ObjTestResults ¶
type ObjTestResults struct { ObjectSize int `json:"objectSize"` Threads int `json:"threads"` PUTResults ObjPUTPerfResults `json:"PUT"` GETResults ObjGETPerfResults `json:"GET"` }
ObjTestResults - result of the object performance test
type ObjectAlreadyExists ¶
type ObjectAlreadyExists struct {
Object string
}
ObjectAlreadyExists - typed return for MethodNotAllowed
func (ObjectAlreadyExists) Error ¶
func (e ObjectAlreadyExists) Error() string
type ObjectAlreadyExistsAsDirectory ¶
type ObjectAlreadyExistsAsDirectory struct {
Object string
}
ObjectAlreadyExistsAsDirectory - typed return for XMinioObjectExistsAsDirectory
func (ObjectAlreadyExistsAsDirectory) Error ¶
func (e ObjectAlreadyExistsAsDirectory) Error() string
type ObjectIsDeleteMarker ¶
type ObjectIsDeleteMarker struct{}
ObjectIsDeleteMarker - object is a delete marker as latest
func (ObjectIsDeleteMarker) Error ¶
func (e ObjectIsDeleteMarker) Error() string
type ObjectMissing ¶
type ObjectMissing struct {
// contains filtered or unexported fields
}
ObjectMissing (EINVAL) - object key missing.
func (ObjectMissing) Error ¶
func (e ObjectMissing) Error() string
type ObjectNameEmpty ¶
type ObjectNameEmpty struct{}
ObjectNameEmpty - object name empty.
func (ObjectNameEmpty) Error ¶
func (e ObjectNameEmpty) Error() string
type ObjectOnGlacier ¶
type ObjectOnGlacier struct {
Object string
}
ObjectOnGlacier - object is of storage class glacier.
func (ObjectOnGlacier) Error ¶
func (e ObjectOnGlacier) Error() string
type ParallelManager ¶
type ParallelManager struct {
// contains filtered or unexported fields
}
ParallelManager - helps manage parallel workers to run tasks
type PathInsufficientPermission ¶
type PathInsufficientPermission GenericFileError
PathInsufficientPermission (EPERM) - permission denied.
func (PathInsufficientPermission) Error ¶
func (e PathInsufficientPermission) Error() string
type PathIsNotRegular ¶
type PathIsNotRegular GenericFileError
PathIsNotRegular (ENOTREG) - file is not a regular file.
func (PathIsNotRegular) Error ¶
func (e PathIsNotRegular) Error() string
type PathNotADirectory ¶
type PathNotADirectory GenericFileError
PathNotADirectory - this path does not correspond to a directory
func (PathNotADirectory) Error ¶
func (e PathNotADirectory) Error() string
type PathNotFound ¶
type PathNotFound GenericFileError
PathNotFound (ENOENT) - file not found.
func (PathNotFound) Error ¶
func (e PathNotFound) Error() string
type PerfTestOutput ¶
type PerfTestOutput struct { ObjectResults *ObjTestResults `json:"object,omitempty"` NetResults *NetTestResults `json:"network,omitempty"` SiteReplicationResults *SiteReplicationTestResults `json:"siteReplication,omitempty"` DriveResults *DriveTestResults `json:"drive,omitempty"` ClientResults *ClientResult `json:"client,omitempty"` Error string `json:"error,omitempty"` }
PerfTestOutput - stores the final output of performance test(s)
func (PerfTestOutput) JSON ¶
func (p PerfTestOutput) JSON() string
JSON - jsonified output of the perf tests
func (PerfTestOutput) String ¶
func (p PerfTestOutput) String() string
String - dummy function to confirm to the 'message' interface. Not used.
type PerfTestResult ¶
type PerfTestResult struct { Type PerfTestType `json:"type"` ObjectResult *madmin.SpeedTestResult `json:"object,omitempty"` NetResult *madmin.NetperfResult `json:"network,omitempty"` SiteReplicationResult *madmin.SiteNetPerfResult `json:"siteReplication,omitempty"` ClientResult *madmin.ClientPerfResult `json:"client,omitempty"` DriveResult []madmin.DriveSpeedTestResult `json:"drive,omitempty"` Err string `json:"err,omitempty"` Final bool `json:"final,omitempty"` }
PerfTestResult - stores the result of a performance test
type PerfTestType ¶
type PerfTestType byte
PerfTestType - The type of performance test (net/drive/object)
const ( NetPerfTest PerfTestType = 1 << iota DrivePerfTest ObjectPerfTest SiteReplicationPerfTest ClientPerfTest )
Constants for performance test type
func (PerfTestType) Name ¶
func (p PerfTestType) Name() string
Name - returns name of the performance test
type PingResult ¶
type PingResult struct { Status string `json:"status"` Counter string `json:"counter"` EndPointsStats []EndPointStats `json:"servers"` }
PingResult contains ping output
func (PingResult) String ¶
func (pr PingResult) String() string
String colorized service status message.
type PrettyRecord ¶
type PrettyRecord struct {
// contains filtered or unexported fields
}
PrettyRecord - an easy struct to format a set of key-value pairs into a record
type PrettyTable ¶
type PrettyTable struct {
// contains filtered or unexported fields
}
PrettyTable - an easy struct to format a set of line
type ProgressReader ¶
ProgressReader can be used to update the progress of an on-going transfer progress.
type ProgressStatus ¶
type ProgressStatus struct {
// contains filtered or unexported fields
}
ProgressStatus shows a progressbar
func (*ProgressStatus) Add ¶
func (ps *ProgressStatus) Add(v int64) Status
Add bytes to current number of bytes
func (*ProgressStatus) AddCounts ¶
func (ps *ProgressStatus) AddCounts(v int64)
AddCounts adds 'v' number of files uploaded.
func (*ProgressStatus) Finish ¶
func (ps *ProgressStatus) Finish()
Finish displays the accounting summary
func (*ProgressStatus) Get ¶
func (ps *ProgressStatus) Get() int64
Get returns the current number of bytes
func (*ProgressStatus) GetCounts ¶
func (ps *ProgressStatus) GetCounts() int64
GetCounts returns number of files uploaded
func (*ProgressStatus) PrintMsg ¶
func (ps *ProgressStatus) PrintMsg(_ message)
PrintMsg prints message
func (*ProgressStatus) Println ¶
func (ps *ProgressStatus) Println(data ...interface{})
Println prints line, ignored for quietstatus
func (*ProgressStatus) Read ¶
func (ps *ProgressStatus) Read(p []byte) (n int, err error)
Read implements the io.Reader interface
func (*ProgressStatus) SetCaption ¶
func (ps *ProgressStatus) SetCaption(s string)
SetCaption sets the caption of the progressbar
func (*ProgressStatus) SetCounts ¶
func (ps *ProgressStatus) SetCounts(v int64)
SetCounts sets number of files uploaded
func (*ProgressStatus) SetTotal ¶
func (ps *ProgressStatus) SetTotal(v int64) Status
SetTotal sets the total of the progressbar
func (*ProgressStatus) Total ¶
func (ps *ProgressStatus) Total() int64
Total returns the total number of bytes
func (*ProgressStatus) Update ¶
func (ps *ProgressStatus) Update()
Update is ignored for quietstatus
type PrometheusConfig ¶
type PrometheusConfig struct {
ScrapeConfigs []ScrapeConfig `yaml:"scrape_configs,omitempty"`
}
PrometheusConfig - container to hold the top level scrape config.
func (PrometheusConfig) JSON ¶
func (c PrometheusConfig) JSON() string
JSON jsonified prometheus config.
func (PrometheusConfig) String ¶
func (c PrometheusConfig) String() string
String colorized prometheus config yaml.
type PutOptions ¶
type PutOptions struct {
// contains filtered or unexported fields
}
PutOptions holds options for PUT operation
type QuietStatus ¶
type QuietStatus struct {
// contains filtered or unexported fields
}
QuietStatus will only show the progress and summary
func (*QuietStatus) Add ¶
func (qs *QuietStatus) Add(v int64) Status
Add bytes to current number of bytes
func (*QuietStatus) AddCounts ¶
func (qs *QuietStatus) AddCounts(v int64)
AddCounts adds 'v' number of files uploaded.
func (*QuietStatus) Get ¶
func (qs *QuietStatus) Get() int64
Get returns the current number of bytes
func (*QuietStatus) GetCounts ¶
func (qs *QuietStatus) GetCounts() int64
GetCounts returns number of files uploaded
func (*QuietStatus) Println ¶
func (qs *QuietStatus) Println(_ ...interface{})
Println prints line, ignored for quietstatus
func (*QuietStatus) Read ¶
func (qs *QuietStatus) Read(p []byte) (n int, err error)
Read implements the io.Reader interface
func (QuietStatus) Set ¶
func (a QuietStatus) Set(n int64) *accounter
Set sets the current value atomically.
func (*QuietStatus) SetCaption ¶
func (qs *QuietStatus) SetCaption(_ string)
SetCaption sets the caption of the progressbar, ignored for quietstatus
func (*QuietStatus) SetCounts ¶
func (qs *QuietStatus) SetCounts(v int64)
SetCounts sets number of files uploaded
func (*QuietStatus) SetTotal ¶
func (qs *QuietStatus) SetTotal(v int64) Status
SetTotal sets the total of the progressbar, ignored for quietstatus
func (QuietStatus) Stat ¶
func (a QuietStatus) Stat() accountStat
Stat provides current stats captured.
func (*QuietStatus) Total ¶
func (qs *QuietStatus) Total() int64
Total returns the total number of bytes
type RemoveResult ¶
RemoveResult returns the error or result of the removed objects.
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row specifies row description and theme
type S3Client ¶
S3Client construct
func (*S3Client) AddNotificationConfig ¶
func (c *S3Client) AddNotificationConfig(ctx context.Context, arn string, events []string, prefix, suffix string, ignoreExisting bool) *probe.Error
AddNotificationConfig - Add bucket notification
func (*S3Client) AddUserAgent ¶
AddUserAgent - add custom user agent.
func (*S3Client) Copy ¶
func (c *S3Client) Copy(ctx context.Context, source string, opts CopyOptions, progress io.Reader) *probe.Error
Copy - copy object, uses server side copy API. Also uses an abstracted API such that large file sizes will be copied in multipart manner on server side.
func (*S3Client) DeleteBucketCors ¶
DeleteBucketCors - Delete bucket cors configuration.
func (*S3Client) DeleteEncryption ¶
DeleteEncryption - removes encryption configuration on a bucket
func (*S3Client) DeleteTags ¶
DeleteTags - Delete tags of bucket or object
func (*S3Client) Get ¶
func (c *S3Client) Get(ctx context.Context, opts GetOptions) (io.ReadCloser, *ClientContent, *probe.Error)
Get - get object with GET options.
func (*S3Client) GetAccessRules ¶
GetAccessRules - get configured policies from the server
func (*S3Client) GetBucketCors ¶
GetBucketCors - Get bucket cors configuration.
func (*S3Client) GetBucketInfo ¶
GetBucketInfo gets info about a bucket
func (*S3Client) GetEncryption ¶
GetEncryption - gets bucket encryption info.
func (*S3Client) GetLifecycle ¶
func (c *S3Client) GetLifecycle(ctx context.Context) (*lifecycle.Configuration, time.Time, *probe.Error)
GetLifecycle - Get current lifecycle configuration.
func (*S3Client) GetObjectLegalHold ¶
func (c *S3Client) GetObjectLegalHold(ctx context.Context, versionID string) (minio.LegalHoldStatus, *probe.Error)
GetObjectLegalHold - Get object legal hold for a given object.
func (*S3Client) GetObjectLockConfig ¶
func (c *S3Client) GetObjectLockConfig(ctx context.Context) (string, minio.RetentionMode, uint64, minio.ValidityUnit, *probe.Error)
GetObjectLockConfig - Get object lock configuration of bucket.
func (*S3Client) GetObjectRetention ¶
func (c *S3Client) GetObjectRetention(ctx context.Context, versionID string) (minio.RetentionMode, time.Time, *probe.Error)
GetObjectRetention - Get object retention for a given object.
func (*S3Client) GetReplication ¶
GetReplication - gets replication configuration for a given bucket.
func (*S3Client) GetReplicationMetrics ¶
GetReplicationMetrics - Get replication metrics for a given bucket.
func (*S3Client) GetVersion ¶
func (c *S3Client) GetVersion(ctx context.Context) (config minio.BucketVersioningConfiguration, err *probe.Error)
GetVersion - gets bucket version info.
func (*S3Client) List ¶
func (c *S3Client) List(ctx context.Context, opts ListOptions) <-chan *ClientContent
List - list at delimited path, if not recursive.
func (*S3Client) ListBuckets ¶
ListBuckets - list buckets
func (*S3Client) ListNotificationConfigs ¶
func (c *S3Client) ListNotificationConfigs(ctx context.Context, arn string) ([]NotificationConfig, *probe.Error)
ListNotificationConfigs - List notification configs
func (*S3Client) MakeBucket ¶
func (c *S3Client) MakeBucket(ctx context.Context, region string, ignoreExisting, withLock bool) *probe.Error
MakeBucket - make a new bucket.
func (*S3Client) Put ¶
func (c *S3Client) Put(ctx context.Context, reader io.Reader, size int64, progress io.Reader, putOpts PutOptions) (int64, *probe.Error)
Put - upload an object with custom metadata.
func (*S3Client) PutObjectLegalHold ¶
func (c *S3Client) PutObjectLegalHold(ctx context.Context, versionID string, lhold minio.LegalHoldStatus) *probe.Error
PutObjectLegalHold - Set object legal hold for a given object.
func (*S3Client) PutObjectRetention ¶
func (c *S3Client) PutObjectRetention(ctx context.Context, versionID string, mode minio.RetentionMode, retainUntilDate time.Time, bypassGovernance bool) *probe.Error
PutObjectRetention - Set object retention for a given object.
func (*S3Client) PutPart ¶
func (c *S3Client) PutPart(ctx context.Context, reader io.Reader, size int64, progress io.Reader, putOpts PutOptions) (int64, *probe.Error)
PutPart - upload an object with custom metadata. (Same as Put)
func (*S3Client) Remove ¶
func (c *S3Client) Remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass, isForceDel bool, contentCh <-chan *ClientContent) <-chan RemoveResult
Remove - remove object or bucket(s).
func (*S3Client) RemoveBucket ¶
RemoveBucket removes a bucket, forcibly if asked
func (*S3Client) RemoveNotificationConfig ¶
func (c *S3Client) RemoveNotificationConfig(ctx context.Context, arn, event, prefix, suffix string) *probe.Error
RemoveNotificationConfig - Remove bucket notification
func (*S3Client) RemoveReplication ¶
RemoveReplication - removes replication configuration for a given bucket.
func (*S3Client) ReplicationResyncStatus ¶
func (c *S3Client) ReplicationResyncStatus(ctx context.Context, arn string) (rinfo replication.ResyncTargetsInfo, err *probe.Error)
ReplicationResyncStatus - gets status of replication resync for this target arn
func (*S3Client) ResetReplication ¶
func (c *S3Client) ResetReplication(ctx context.Context, before time.Duration, tgtArn string) (rinfo replication.ResyncTargetsInfo, err *probe.Error)
ResetReplication - kicks off replication again on previously replicated objects if existing object replication is enabled in the replication config.Optional to provide a timestamp
func (*S3Client) Select ¶
func (c *S3Client) Select(ctx context.Context, expression string, sse encrypt.ServerSide, selOpts SelectObjectOpts) (io.ReadCloser, *probe.Error)
Select - select object content wrapper.
func (*S3Client) SetBucketCors ¶
SetBucketCors - Set bucket cors configuration.
func (*S3Client) SetEncryption ¶
SetEncryption - Set encryption configuration on a bucket
func (*S3Client) SetLifecycle ¶
SetLifecycle - Set lifecycle configuration on a bucket
func (*S3Client) SetObjectLockConfig ¶
func (c *S3Client) SetObjectLockConfig(ctx context.Context, mode minio.RetentionMode, validity uint64, unit minio.ValidityUnit) *probe.Error
SetObjectLockConfig - Set object lock configurataion of bucket.
func (*S3Client) SetReplication ¶
func (c *S3Client) SetReplication(ctx context.Context, cfg *replication.Config, opts replication.Options) *probe.Error
SetReplication sets replication configuration for a given bucket.
func (*S3Client) SetVersion ¶
func (c *S3Client) SetVersion(ctx context.Context, status string, prefixes []string, excludeFolders bool) *probe.Error
SetVersion - Set version configuration on a bucket
func (*S3Client) ShareDownload ¶
func (c *S3Client) ShareDownload(ctx context.Context, versionID string, expires time.Duration) (string, *probe.Error)
ShareDownload - get a usable presigned object url to share.
func (*S3Client) ShareUpload ¶
func (c *S3Client) ShareUpload(ctx context.Context, isRecursive bool, expires time.Duration, contentType string) (string, map[string]string, *probe.Error)
ShareUpload - get data for presigned post http form upload.
func (*S3Client) Stat ¶
func (c *S3Client) Stat(ctx context.Context, opts StatOptions) (*ClientContent, *probe.Error)
Stat - send a 'HEAD' on a bucket or object to fetch its metadata. It also returns a DIR type content if a prefix does exist in the server.
func (*S3Client) Watch ¶
func (c *S3Client) Watch(ctx context.Context, options WatchOptions) (*WatchObject, *probe.Error)
Watch - Start watching on all bucket events for a given account ID.
type SameFile ¶
type SameFile struct {
Source, Destination string
}
SameFile - source and destination are same files.
type SchemaVersion ¶
type SchemaVersion struct {
Version string `json:"version"`
}
SchemaVersion - version of the health report schema
type ScrapeConfig ¶
type ScrapeConfig struct { JobName string `yaml:"job_name" json:"jobName"` BearerToken string `yaml:"bearer_token,omitempty" json:"bearerToken,omitempty"` MetricsPath string `yaml:"metrics_path,omitempty" json:"metricsPath"` Scheme string `yaml:"scheme,omitempty" json:"scheme"` StaticConfigs []StatConfig `yaml:"static_configs,omitempty" json:"staticConfigs"` }
ScrapeConfig configures a scraping unit for Prometheus.
type SelectObjectOpts ¶
type SelectObjectOpts struct { InputSerOpts map[string]map[string]string OutputSerOpts map[string]map[string]string CompressionType minio.SelectCompressionType }
SelectObjectOpts - opts entered for select API
type SiteNetStats ¶
type SiteNetStats struct { TX uint64 `json:"tx"` // transfer rate in bytes TXTotalDuration time.Duration `json:"txTotalDuration"` RX uint64 `json:"rx"` // received rate in bytes RXTotalDuration time.Duration `json:"rxTotalDuration"` TotalConn uint64 `json:"totalConn"` }
SiteNetStats - status for siteNet
type SiteReplicationTestNodeResult ¶
type SiteReplicationTestNodeResult struct { Endpoint string `json:"endpoint"` Perf SiteNetStats `json:"perf"` Error string `json:"error,omitempty"` }
SiteReplicationTestNodeResult - result of the network performance test for site-replication
type SiteReplicationTestResults ¶
type SiteReplicationTestResults struct {
Results []SiteReplicationTestNodeResult `json:"servers"`
}
SiteReplicationTestResults - result of the network performance test across all site-replication
type StatConfig ¶
type StatConfig struct {
Targets []string `yaml:",flow" json:"targets"`
}
StatConfig - container to hold the targets config.
type StatOptions ¶
type StatOptions struct {
// contains filtered or unexported fields
}
StatOptions holds options of the HEAD operation
type Status ¶
type Status interface { Println(data ...interface{}) AddCounts(int64) SetCounts(int64) GetCounts() int64 Add(int64) Status Get() int64 Start() Finish() PrintMsg(msg message) Update() Total() int64 SetTotal(int64) Status SetCaption(string) Read(p []byte) (n int, err error) // contains filtered or unexported methods }
Status implements a interface that can be used in quit mode or with progressbar.
func NewProgressStatus ¶
NewProgressStatus returns a progress status object
func NewQuietStatus ¶
NewQuietStatus returns a quiet status object
type SubnetFileUploader ¶
type SubnetFileUploader struct { FilePath string // file to upload ReqURL string // SUBNET upload URL Params url.Values // query params to be sent in the request Headers SubnetHeaders // headers to be sent in the request AutoCompress bool // whether to compress (zst) the file before uploading DeleteAfterUpload bool // whether to delete the file after successful upload // contains filtered or unexported fields }
SubnetFileUploader - struct to upload files to SUBNET
func (*SubnetFileUploader) UploadFileToSubnet ¶
func (i *SubnetFileUploader) UploadFileToSubnet() (string, error)
UploadFileToSubnet - uploads the file to SUBNET
type SubnetHeaders ¶
SubnetHeaders - type for SUBNET request headers
func SubnetAPIKeyAuthHeaders ¶
func SubnetAPIKeyAuthHeaders(apiKey string) SubnetHeaders
SubnetAPIKeyAuthHeaders - returns the headers for SUBNET API key authentication
type SubnetLoginReq ¶
SubnetLoginReq - JSON payload of the SUBNET login api
type SubnetMFAReq ¶
type SubnetMFAReq struct { Username string `json:"username"` OTP string `json:"otp"` Token string `json:"token"` }
SubnetMFAReq - JSON payload of the SUBNET mfa api
type SwInfoV1 ¶
type SwInfoV1 struct { Minio MinioHealthInfoV1 `json:"minio,omitempty"` OsInfo []madmin.ServerOsInfo `json:"osinfos,omitempty"` }
SwInfoV1 - software health Info
type TooManyLevelsSymlink ¶
type TooManyLevelsSymlink GenericFileError
TooManyLevelsSymlink (ELOOP) - file has too many levels of symlinks.
func (TooManyLevelsSymlink) Error ¶
func (e TooManyLevelsSymlink) Error() string
type URLs ¶
type URLs struct { SourceAlias string SourceContent *ClientContent TargetAlias string TargetContent *ClientContent TotalCount int64 TotalSize int64 MD5 bool DisableMultipart bool Error *probe.Error `json:"-"` ErrorCond differType `json:"-"` // contains filtered or unexported fields }
URLs contains source and target urls
type UnexpectedEOF ¶
UnexpectedEOF (EPIPE) - reader closed prematurely.
func (UnexpectedEOF) Error ¶
func (e UnexpectedEOF) Error() string
type UnexpectedExcessRead ¶
type UnexpectedExcessRead UnexpectedEOF
UnexpectedExcessRead - reader wrote more data than requested.
func (UnexpectedExcessRead) Error ¶
func (e UnexpectedExcessRead) Error() string
type UnexpectedShortWrite ¶
UnexpectedShortWrite - write wrote less bytes than expected.
func (UnexpectedShortWrite) Error ¶
func (e UnexpectedShortWrite) Error() string
type WatchObject ¶
type WatchObject struct { // eventInfo will be put on this chan EventInfoChan chan []EventInfo // errors will be put on this chan ErrorChan chan *probe.Error // will stop the watcher goroutines DoneChan chan struct{} }
WatchObject captures watch channels to read and listen on.
func (*WatchObject) Errors ¶
func (w *WatchObject) Errors() chan *probe.Error
Errors returns the chan receiving errors
func (*WatchObject) Events ¶
func (w *WatchObject) Events() chan []EventInfo
Events returns the chan receiving events
type WatchOptions ¶
WatchOptions contains watch configuration options
type Watcher ¶
type Watcher struct { // all error will be added to this chan ErrorChan chan *probe.Error // all events will be added to this chan EventInfoChan chan []EventInfo // contains filtered or unexported fields }
Watcher can be used to have one or multiple clients watch for notifications
func NewWatcher ¶
NewWatcher creates a new watcher
Source Files ¶
- access-perms.go
- accounting-reader.go
- admin-accesskey-create.go
- admin-accesskey-disable.go
- admin-accesskey-edit.go
- admin-accesskey-enable.go
- admin-accesskey-info.go
- admin-accesskey-list.go
- admin-accesskey-remove.go
- admin-accesskey.go
- admin-bucket-info.go
- admin-bucket-quota.go
- admin-bucket-remote-add.go
- admin-bucket-remote-edit.go
- admin-bucket-remote-main.go
- admin-bucket-remote-remove.go
- admin-bucket.go
- admin-cluster-bucket-export.go
- admin-cluster-bucket-import.go
- admin-cluster-bucket.go
- admin-cluster-iam-export.go
- admin-cluster-iam-import.go
- admin-cluster-iam.go
- admin-cluster.go
- admin-config-export.go
- admin-config-get.go
- admin-config-help.go
- admin-config-history.go
- admin-config-import.go
- admin-config-reset.go
- admin-config-restore.go
- admin-config-set.go
- admin-config.go
- admin-console.go
- admin-decom-cancel.go
- admin-decom-start.go
- admin-decom-status.go
- admin-decom.go
- admin-group-add.go
- admin-group-disable.go
- admin-group-enable.go
- admin-group-info.go
- admin-group-list.go
- admin-group-remove.go
- admin-group.go
- admin-heal-result-item.go
- admin-heal-ui.go
- admin-heal.go
- admin-idp.go
- admin-info.go
- admin-inspect.go
- admin-kms-key-create.go
- admin-kms-key-list.go
- admin-kms-key-status.go
- admin-kms-key.go
- admin-kms.go
- admin-logs.go
- admin-main.go
- admin-policy-add.go
- admin-policy-attach.go
- admin-policy-create.go
- admin-policy-detach.go
- admin-policy-entities.go
- admin-policy-info.go
- admin-policy-list.go
- admin-policy-remove.go
- admin-policy-set.go
- admin-policy-unset.go
- admin-policy-update.go
- admin-policy.go
- admin-profile-start.go
- admin-profile-stop.go
- admin-profile.go
- admin-prometheus-generate.go
- admin-prometheus-metrics-v3.go
- admin-prometheus-metrics.go
- admin-prometheus.go
- admin-rebalance-main.go
- admin-rebalance-start.go
- admin-rebalance-status.go
- admin-rebalance-stop.go
- admin-replicate-add.go
- admin-replicate-info.go
- admin-replicate-remove.go
- admin-replicate-resync-cancel.go
- admin-replicate-resync-start.go
- admin-replicate-resync-status.go
- admin-replicate-resync.go
- admin-replicate-status.go
- admin-replicate-update.go
- admin-replicate.go
- admin-scanner-status.go
- admin-scanner-trace.go
- admin-scanner.go
- admin-service-freeze.go
- admin-service-restart.go
- admin-service-stop.go
- admin-service-unfreeze.go
- admin-service.go
- admin-subnet-health.go
- admin-subnet-register.go
- admin-subnet.go
- admin-tier-deprecated.go
- admin-tier-main.go
- admin-top-api.go
- admin-top-locks.go
- admin-top.go
- admin-trace.go
- admin-update.go
- admin-user-add.go
- admin-user-disable.go
- admin-user-enable.go
- admin-user-info.go
- admin-user-list.go
- admin-user-policy.go
- admin-user-remove.go
- admin-user-sts-info.go
- admin-user-svcacct-add.go
- admin-user-svcacct-disable.go
- admin-user-svcacct-enable.go
- admin-user-svcacct-info.go
- admin-user-svcacct-list.go
- admin-user-svcacct-remove.go
- admin-user-svcacct-set.go
- admin-user-svcacct.go
- admin-user.go
- alias-export.go
- alias-import.go
- alias-list.go
- alias-main.go
- alias-remove.go
- alias-set.go
- anonymous-main.go
- arg-kvs.go
- auto-complete.go
- batch-cancel.go
- batch-describe.go
- batch-generate.go
- batch-list.go
- batch-main.go
- batch-start.go
- batch-status.go
- build-constants.go
- cat-main.go
- certs.go
- client-admin.go
- client-errors.go
- client-fs.go
- client-fs_linux.go
- client-s3-trace_v2.go
- client-s3-trace_v4.go
- client-s3.go
- client-url.go
- client.go
- common-methods.go
- config-deprecated.go
- config-fix.go
- config-migrate.go
- config-old.go
- config-utils.go
- config-v10.go
- config-validate.go
- config.go
- cors-get.go
- cors-main.go
- cors-remove.go
- cors-set.go
- cp-main.go
- cp-main_contrib.go
- cp-url-syntax.go
- cp-url.go
- diff-main.go
- difference.go
- du-main.go
- duration.go
- encrypt-clear.go
- encrypt-info.go
- encrypt-main.go
- encrypt-set.go
- encryption-methods.go
- error.go
- event-add.go
- event-list.go
- event-main.go
- event-remove.go
- find-main.go
- find.go
- flags.go
- fs-pathutils_nix.go
- get-main.go
- get-url.go
- globals.go
- head-main.go
- health.go
- health_v1.go
- humanized-duration.go
- idp-ldap-accesskey-create-with-login.go
- idp-ldap-accesskey-create.go
- idp-ldap-accesskey-disable.go
- idp-ldap-accesskey-edit.go
- idp-ldap-accesskey-enable.go
- idp-ldap-accesskey-info.go
- idp-ldap-accesskey-list.go
- idp-ldap-accesskey-remove.go
- idp-ldap-accesskey.go
- idp-ldap-policy-subcommands.go
- idp-ldap-policy.go
- idp-ldap-subcommands.go
- idp-ldap.go
- idp-openid-subcommands.go
- idp-openid.go
- idp.go
- ilm-deprecated-cmds.go
- ilm-main.go
- ilm-remove.go
- ilm-restore.go
- ilm-rule-add.go
- ilm-rule-edit.go
- ilm-rule-export.go
- ilm-rule-import.go
- ilm-rule-list.go
- ilm-rule-main.go
- ilm-tier-add.go
- ilm-tier-check.go
- ilm-tier-edit.go
- ilm-tier-info.go
- ilm-tier-list.go
- ilm-tier-main.go
- ilm-tier-remove.go
- ilm-tier-update.go
- ilm-tier-verify.go
- legalhold-clear.go
- legalhold-info.go
- legalhold-main.go
- legalhold-set.go
- license-info.go
- license-register.go
- license-unregister.go
- license-update.go
- license.go
- ls-main.go
- ls.go
- main.go
- mb-main.go
- mirror-main.go
- mirror-url.go
- mv-main.go
- od-main.go
- od-stream.go
- parallel-manager.go
- ping.go
- pipe-main.go
- pipe_supported.go
- pipechan.go
- policy-main.go
- pretty-record.go
- pretty-table.go
- print.go
- profiling.go
- progress-bar.go
- put-main.go
- put-url.go
- quota-clear.go
- quota-info.go
- quota-main.go
- quota-set.go
- rb-main.go
- ready-main.go
- replicate-add.go
- replicate-backlog.go
- replicate-export.go
- replicate-import.go
- replicate-list.go
- replicate-main.go
- replicate-remove.go
- replicate-reset-main.go
- replicate-reset-start.go
- replicate-reset-status.go
- replicate-status.go
- replicate-update.go
- retention-clear.go
- retention-common.go
- retention-info.go
- retention-main.go
- retention-set.go
- retry.go
- rm-main.go
- share-db-v1.go
- share-download-main.go
- share-list-main.go
- share-main.go
- share-upload-main.go
- share.go
- signals.go
- speedtest-spinner.go
- sql-main.go
- stat-main.go
- stat.go
- status.go
- subnet-file-uploader.go
- subnet-utils.go
- support-callhome.go
- support-diag-spinner-v3.go
- support-diag.go
- support-inspect.go
- support-perf-client.go
- support-perf-drive.go
- support-perf-net.go
- support-perf-object.go
- support-perf-site-replication.go
- support-perf.go
- support-profile.go
- support-proxy-remove.go
- support-proxy-set.go
- support-proxy-show.go
- support-proxy.go
- support-register.go
- support-top-api.go
- support-top-drive.go
- support-top-locks.go
- support-top-net.go
- support-top-rcp.go
- support-top.go
- support-upload.go
- support.go
- table-ui.go
- tag-list.go
- tag-main.go
- tag-remove.go
- tag-set.go
- term-pager.go
- tofu.go
- top-drives-spinner.go
- top-net-spinner.go
- trace-stats-ui.go
- tree-main.go
- typed-errors.go
- undo-main.go
- update-main.go
- update-notifier.go
- update_nofips.go
- urls.go
- utils.go
- version-enable.go
- version-info.go
- version-main.go
- version-suspend.go
- watch-main.go
- watch.go