Documentation
¶
Index ¶
- type And
- type Config
- type CounterSummary
- type DeleteMarkerReplication
- type DeleteReplication
- type Destination
- type DowntimeInfo
- type ExistingObjectReplication
- type Filter
- type InProgressMetric
- type InQueueMetric
- type MetricName
- type Metrics
- type MetricsV2
- type OptionType
- type Options
- type QStat
- type RStat
- type ReplMRFStats
- type ReplQNodeStats
- type ReplQStats
- type ReplQueueStats
- type ReplicaModifications
- type ResyncTarget
- type ResyncTargetsInfo
- type Rule
- type SourceSelectionCriteria
- type Stat
- type Status
- type Tag
- type TargetMetrics
- type TgtHealth
- type TimedErrStats
- type WorkerStat
- type XferStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type And ¶
type And struct {
XMLName xml.Name `xml:"And,omitempty" json:"-"`
Prefix string `xml:"Prefix,omitempty" json:"Prefix,omitempty"`
Tags []Tag `xml:"Tag,omitempty" json:"Tag,omitempty"`
}
And - a tag to combine a prefix and multiple tags for replication configuration rule.
type Config ¶
type Config struct {
XMLName xml.Name `xml:"ReplicationConfiguration" json:"-"`
Rules []Rule `xml:"Rule" json:"Rules"`
Role string `xml:"Role" json:"Role"`
}
Config - replication configuration specified in https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html
func (*Config) AddRule ¶
AddRule adds a new rule to existing replication config. If a rule exists with the same ID, then the rule is replaced.
func (*Config) RemoveRule ¶
RemoveRule removes a rule from replication config.
type CounterSummary ¶
type CounterSummary struct {
// Counted last 1hr
Last1hr uint64 `json:"last1hr"`
// Counted last 1m
Last1m uint64 `json:"last1m"`
// Total counted since uptime
Total uint64 `json:"total"`
}
CounterSummary denotes the stats counter summary
type DeleteMarkerReplication ¶
type DeleteMarkerReplication struct {
Status Status `xml:"Status" json:"Status"` // should be set to "Disabled" by default
}
DeleteMarkerReplication - whether delete markers are replicated - https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html
func (DeleteMarkerReplication) IsEmpty ¶
func (d DeleteMarkerReplication) IsEmpty() bool
IsEmpty returns true if DeleteMarkerReplication is not set
type DeleteReplication ¶
type DeleteReplication struct {
Status Status `xml:"Status" json:"Status"` // should be set to "Disabled" by default
}
DeleteReplication - whether versioned deletes are replicated - this is a MinIO specific extension
func (DeleteReplication) IsEmpty ¶
func (d DeleteReplication) IsEmpty() bool
IsEmpty returns true if DeleteReplication is not set
type Destination ¶
type Destination struct {
XMLName xml.Name `xml:"Destination" json:"-"`
Bucket string `xml:"Bucket" json:"Bucket"`
StorageClass string `xml:"StorageClass,omitempty" json:"StorageClass,omitempty"`
}
Destination - destination in ReplicationConfiguration.
type DowntimeInfo ¶
DowntimeInfo represents the downtime info
type ExistingObjectReplication ¶
type ExistingObjectReplication struct {
Status Status `xml:"Status"` // should be set to "Disabled" by default
}
ExistingObjectReplication - whether existing object replication is enabled
func (ExistingObjectReplication) IsEmpty ¶
func (e ExistingObjectReplication) IsEmpty() bool
IsEmpty returns true if DeleteMarkerReplication is not set
func (ExistingObjectReplication) Validate ¶
func (e ExistingObjectReplication) Validate() error
Validate validates whether the status is disabled.
type Filter ¶
type Filter struct {
XMLName xml.Name `xml:"Filter" json:"-"`
Prefix string `json:"Prefix,omitempty"`
And And `xml:"And,omitempty" json:"And,omitempty"`
Tag Tag `xml:"Tag,omitempty" json:"Tag,omitempty"`
}
Filter - a filter for a replication configuration Rule.
type InProgressMetric ¶
type InProgressMetric InQueueMetric
InProgressMetric holds stats for objects with replication in progress
type InQueueMetric ¶
type InQueueMetric struct {
Curr QStat `json:"curr" msg:"cq"`
Avg QStat `json:"avg" msg:"aq"`
Max QStat `json:"peak" msg:"pq"`
}
InQueueMetric holds stats for objects in replication queue
type MetricName ¶
type MetricName string
MetricName name of replication metric
const ( // Large is a metric name for large objects >=128MiB Large MetricName = "Large" // Small is a metric name for objects <128MiB size Small MetricName = "Small" // Total is a metric name for total objects Total MetricName = "Total" )
type Metrics ¶
type Metrics struct {
Stats map[string]TargetMetrics
// Completed size in bytes across targets
ReplicatedSize uint64 `json:"completedReplicationSize,omitempty"`
// Total Replica size in bytes across targets
ReplicaSize uint64 `json:"replicaSize,omitempty"`
// Total Replica counts
ReplicaCount int64 `json:"replicaCount,omitempty"`
// Total Replicated count
ReplicatedCount int64 `json:"replicationCount,omitempty"`
// errors seen in replication in last minute, hour and total
Errors TimedErrStats `json:"failed,omitempty"`
// Total number of entries that are queued for replication
QStats InQueueMetric `json:"queued"`
// Total number of entries that have replication in progress
InProgress InProgressMetric `json:"inProgress"`
// Deprecated fields
// Total Pending size in bytes across targets
PendingSize uint64 `json:"pendingReplicationSize,omitempty"`
// Failed size in bytes across targets
FailedSize uint64 `json:"failedReplicationSize,omitempty"`
// Total number of pending operations including metadata updates across targets
PendingCount uint64 `json:"pendingReplicationCount,omitempty"`
// Total number of failed operations including metadata updates across targets
FailedCount uint64 `json:"failedReplicationCount,omitempty"`
}
Metrics represents inline replication metrics for a bucket.
type MetricsV2 ¶
type MetricsV2 struct {
Uptime int64 `json:"uptime"`
CurrentStats Metrics `json:"currStats"`
QueueStats ReplQueueStats `json:"queueStats"`
DowntimeInfo map[string]DowntimeInfo `json:"downtimeInfo"`
}
MetricsV2 represents replication metrics for a bucket.
type OptionType ¶
type OptionType string
OptionType specifies operation to be performed on config
const ( // AddOption specifies addition of rule to config AddOption OptionType = "Add" // SetOption specifies modification of existing rule to config SetOption OptionType = "Set" // RemoveOption specifies rule options are for removing a rule RemoveOption OptionType = "Remove" // ImportOption is for getting current config ImportOption OptionType = "Import" )
type Options ¶
type Options struct {
Op OptionType
RoleArn string
ID string
Prefix string
RuleStatus string
Priority string
TagString string
StorageClass string
DestBucket string
IsTagSet bool
IsSCSet bool
ReplicateDeletes string // replicate versioned deletes
ReplicateDeleteMarkers string // replicate soft deletes
ReplicaSync string // replicate replica metadata modifications
ExistingObjectReplicate string
}
Options represents options to set a replication configuration rule
type ReplMRFStats ¶
type ReplMRFStats struct {
LastFailedCount uint64 `json:"failedCount_last5min"`
// Count of unreplicated entries that were dropped after MRF retry limit reached since cluster start.
TotalDroppedCount uint64 `json:"droppedCount_since_uptime"`
// Bytes of unreplicated entries that were dropped after MRF retry limit reached since cluster start.
TotalDroppedBytes uint64 `json:"droppedBytes_since_uptime"`
}
ReplMRFStats holds stats of MRF backlog saved to disk in the last 5 minutes and number of entries that failed replication after 3 retries
type ReplQNodeStats ¶
type ReplQNodeStats struct {
NodeName string `json:"nodeName"`
Uptime int64 `json:"uptime"`
Workers WorkerStat `json:"workers"`
XferStats map[MetricName]XferStats `json:"transferSummary"`
TgtXferStats map[string]map[MetricName]XferStats `json:"tgtTransferStats"`
QStats InQueueMetric `json:"queueStats"`
InProgressStats InProgressMetric `json:"progressStats"`
MRFStats ReplMRFStats `json:"mrfStats"`
Retries CounterSummary `json:"retries"`
Errors CounterSummary `json:"errors"`
TgtHealth map[string]TgtHealth `json:"tgtHealth,omitempty"`
}
ReplQNodeStats holds stats for a node in replication queue
type ReplQStats ¶
type ReplQStats struct {
Uptime int64 `json:"uptime"`
Workers WorkerStat `json:"workers"`
XferStats map[MetricName]XferStats `json:"xferStats"`
TgtXferStats map[string]map[MetricName]XferStats `json:"tgtXferStats"`
QStats InQueueMetric `json:"qStats"`
InProgressStats InProgressMetric `json:"progressStats"`
MRFStats ReplMRFStats `json:"mrfStats"`
Retries CounterSummary `json:"retries"`
Errors CounterSummary `json:"errors"`
}
ReplQStats holds stats for objects in replication queue
type ReplQueueStats ¶
type ReplQueueStats struct {
Nodes []ReplQNodeStats `json:"nodes"`
}
ReplQueueStats holds stats for replication queue across nodes
func (ReplQueueStats) QStats ¶
func (q ReplQueueStats) QStats() (r ReplQStats)
QStats returns cluster level stats for objects in replication queue
func (ReplQueueStats) Workers ¶
func (q ReplQueueStats) Workers() (tot WorkerStat)
Workers returns number of workers across all nodes
type ReplicaModifications ¶
type ReplicaModifications struct {
Status Status `xml:"Status" json:"Status"` // should be set to "Enabled" by default
}
ReplicaModifications specifies if replica modification sync is enabled
type ResyncTarget ¶
type ResyncTarget struct {
Arn string `json:"arn"`
ResetID string `json:"resetid"`
StartTime time.Time `json:"startTime,omitempty"`
EndTime time.Time `json:"endTime,omitempty"`
// Status of resync operation
ResyncStatus string `json:"resyncStatus,omitempty"`
// Completed size in bytes
ReplicatedSize int64 `json:"completedReplicationSize,omitempty"`
// Failed size in bytes
FailedSize int64 `json:"failedReplicationSize,omitempty"`
// Total number of failed operations
FailedCount int64 `json:"failedReplicationCount,omitempty"`
// Total number of completed operations
ReplicatedCount int64 `json:"replicationCount,omitempty"`
// Last bucket/object replicated.
Bucket string `json:"bucket,omitempty"`
Object string `json:"object,omitempty"`
}
ResyncTarget provides the replica resources and resetID to initiate resync replication.
type ResyncTargetsInfo ¶
type ResyncTargetsInfo struct {
Targets []ResyncTarget `json:"target,omitempty"`
}
ResyncTargetsInfo provides replication target information to resync replicated data.
type Rule ¶
type Rule struct {
XMLName xml.Name `xml:"Rule" json:"-"`
ID string `xml:"ID,omitempty"`
Status Status `xml:"Status"`
Priority int `xml:"Priority"`
DeleteMarkerReplication DeleteMarkerReplication `xml:"DeleteMarkerReplication"`
DeleteReplication DeleteReplication `xml:"DeleteReplication"`
Destination Destination `xml:"Destination"`
Filter Filter `xml:"Filter" json:"Filter"`
SourceSelectionCriteria SourceSelectionCriteria `xml:"SourceSelectionCriteria" json:"SourceSelectionCriteria"`
ExistingObjectReplication ExistingObjectReplication `xml:"ExistingObjectReplication,omitempty" json:"ExistingObjectReplication,omitempty"`
}
Rule - a rule for replication configuration.
func (Rule) Prefix ¶
Prefix - a rule can either have prefix under <filter></filter> or under <filter><and></and></filter>. This method returns the prefix from the location where it is available
type SourceSelectionCriteria ¶
type SourceSelectionCriteria struct {
ReplicaModifications ReplicaModifications `xml:"ReplicaModifications" json:"ReplicaModifications"`
}
SourceSelectionCriteria - specifies additional source selection criteria in ReplicationConfiguration.
func (SourceSelectionCriteria) IsValid ¶
func (s SourceSelectionCriteria) IsValid() bool
IsValid - checks whether SourceSelectionCriteria is valid or not.
func (SourceSelectionCriteria) Validate ¶
func (s SourceSelectionCriteria) Validate() error
Validate source selection criteria
type Tag ¶
type Tag struct {
XMLName xml.Name `json:"-"`
Key string `xml:"Key,omitempty" json:"Key,omitempty"`
Value string `xml:"Value,omitempty" json:"Value,omitempty"`
}
Tag - a tag for a replication configuration Rule filter.
type TargetMetrics ¶
type TargetMetrics struct {
// Completed count
ReplicatedCount uint64 `json:"replicationCount,omitempty"`
// Completed size in bytes
ReplicatedSize uint64 `json:"completedReplicationSize,omitempty"`
// Bandwidth limit in bytes/sec for this target
BandWidthLimitInBytesPerSecond int64 `json:"limitInBits,omitempty"`
// Current bandwidth used in bytes/sec for this target
CurrentBandwidthInBytesPerSecond float64 `json:"currentBandwidth,omitempty"`
// errors seen in replication in last minute, hour and total
Failed TimedErrStats `json:"failed,omitempty"`
// Deprecated fields
// Pending size in bytes
PendingSize uint64 `json:"pendingReplicationSize,omitempty"`
// Total Replica size in bytes
ReplicaSize uint64 `json:"replicaSize,omitempty"`
// Failed size in bytes
FailedSize uint64 `json:"failedReplicationSize,omitempty"`
// Total number of pending operations including metadata updates
PendingCount uint64 `json:"pendingReplicationCount,omitempty"`
// Total number of failed operations including metadata updates
FailedCount uint64 `json:"failedReplicationCount,omitempty"`
}
TargetMetrics represents inline replication metrics such as pending, failed and completed bytes in total for a bucket remote target
type TgtHealth ¶
type TgtHealth struct {
Online bool `json:"online"`
LastOnline time.Time `json:"lastOnline"`
TotalDowntime time.Duration `json:"totalDowntime"`
OfflineCount int64 `json:"offlineCount"`
}
TgtHealth holds health status of a target
type TimedErrStats ¶
type TimedErrStats struct {
LastMinute RStat `json:"lastMinute"`
LastHour RStat `json:"lastHour"`
Totals RStat `json:"totals"`
}
TimedErrStats holds error stats for a time period
func (TimedErrStats) Add ¶
func (te TimedErrStats) Add(o TimedErrStats) TimedErrStats
Add two TimedErrStats
type WorkerStat ¶
WorkerStat has stats on number of replication workers