summaryrefslogtreecommitdiff
path: root/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2025-04-07 11:05:51 +0100
committerLibravatar GitHub <noreply@github.com>2025-04-07 11:05:51 +0100
commitbce643286c6a136db47f2cf7bf3c4fa16a9d6a00 (patch)
treefa621fd5af6bb8fd26d28103b9c3f8d57c088f98 /vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go
parent[chore]: Bump github.com/tdewolff/minify/v2 from 2.22.4 to 2.23.0 (#3974) (diff)
downloadgotosocial-bce643286c6a136db47f2cf7bf3c4fa16a9d6a00.tar.xz
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.85 to 7.0.89 (#3977)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.85 to 7.0.89. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.85...v7.0.89) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-version: 7.0.89 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go')
-rw-r--r--vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go48
1 files changed, 41 insertions, 7 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go b/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go
index 65a2f75e9..55636ad48 100644
--- a/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go
+++ b/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go
@@ -868,8 +868,20 @@ type ReplQNodeStats struct {
XferStats map[MetricName]XferStats `json:"transferSummary"`
TgtXferStats map[string]map[MetricName]XferStats `json:"tgtTransferStats"`
- QStats InQueueMetric `json:"queueStats"`
- MRFStats ReplMRFStats `json:"mrfStats"`
+ QStats InQueueMetric `json:"queueStats"`
+ MRFStats ReplMRFStats `json:"mrfStats"`
+ Retries CounterSummary `json:"retries"`
+ Errors CounterSummary `json:"errors"`
+}
+
+// CounterSummary denotes the stats counter summary
+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"`
}
// ReplQueueStats holds stats for replication queue across nodes
@@ -914,8 +926,10 @@ type ReplQStats struct {
XferStats map[MetricName]XferStats `json:"xferStats"`
TgtXferStats map[string]map[MetricName]XferStats `json:"tgtXferStats"`
- QStats InQueueMetric `json:"qStats"`
- MRFStats ReplMRFStats `json:"mrfStats"`
+ QStats InQueueMetric `json:"qStats"`
+ MRFStats ReplMRFStats `json:"mrfStats"`
+ Retries CounterSummary `json:"retries"`
+ Errors CounterSummary `json:"errors"`
}
// QStats returns cluster level stats for objects in replication queue
@@ -958,6 +972,12 @@ func (q ReplQueueStats) QStats() (r ReplQStats) {
r.MRFStats.LastFailedCount += node.MRFStats.LastFailedCount
r.MRFStats.TotalDroppedCount += node.MRFStats.TotalDroppedCount
r.MRFStats.TotalDroppedBytes += node.MRFStats.TotalDroppedBytes
+ r.Retries.Last1hr += node.Retries.Last1hr
+ r.Retries.Last1m += node.Retries.Last1m
+ r.Retries.Total += node.Retries.Total
+ r.Errors.Last1hr += node.Errors.Last1hr
+ r.Errors.Last1m += node.Errors.Last1m
+ r.Errors.Total += node.Errors.Total
r.Uptime += node.Uptime
}
if len(q.Nodes) > 0 {
@@ -968,7 +988,21 @@ func (q ReplQueueStats) QStats() (r ReplQStats) {
// MetricsV2 represents replication metrics for a bucket.
type MetricsV2 struct {
- Uptime int64 `json:"uptime"`
- CurrentStats Metrics `json:"currStats"`
- QueueStats ReplQueueStats `json:"queueStats"`
+ Uptime int64 `json:"uptime"`
+ CurrentStats Metrics `json:"currStats"`
+ QueueStats ReplQueueStats `json:"queueStats"`
+ DowntimeInfo map[string]DowntimeInfo `json:"downtimeInfo"`
+}
+
+// DowntimeInfo represents the downtime info
+type DowntimeInfo struct {
+ Duration Stat `json:"duration"`
+ Count Stat `json:"count"`
+}
+
+// Stat represents the aggregates
+type Stat struct {
+ Total int64 `json:"total"`
+ Avg int64 `json:"avg"`
+ Max int64 `json:"max"`
}