-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathreplication.go
70 lines (64 loc) · 3.69 KB
/
replication.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//
// Copyright (c) 2015-2025 MinIO, Inc.
//
// This file is part of MinIO Object Storage stack
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package madmin
import (
"time"
)
// ReplDiagInfo represents the replication diagnostic information to be captured
// as part of health diagnostic information
type ReplDiagInfo struct {
Error string `json:"error,omitempty"`
SREnabled bool `json:"site_replication_enabled"`
TotalUsers int `json:"total_users,omitempty"`
SyncPendingUsers int `json:"sync_pending_users,omitempty"`
TotalGroups int `json:"total_groups,omitempty"`
SyncPendingGroups int `json:"sync_pending_groups,omitempty"`
TotalPolicies int `json:"total_policies,omitempty"`
SyncPendingPolicies int `json:"sync_pending_policies,omitempty"`
TotalILMExpRules int `json:"total_ilm_exp_rules,omitempty"`
SyncPendingILMExpRules int `json:"sync_pending_ilm_exp_rules,omitempty"`
TotalBuckets int `json:"total_buckets,omitempty"`
SyncPendingBuckets int `json:"sync_pending_buckets,omitempty"`
Errors Counter `json:"errors,omitempty"`
Retries Counter `json:"retries,omitempty"`
Sites []ReplDiagSite `json:"sites,omitempty"`
ReplBuckets []ReplDiagBucket `json:"repl_buckets,omitempty"`
UserPolMismatches map[string]map[string]SRPolicyStatsSummary `json:"user_policy_mismatches,omitempty"`
GroupPolMismatches map[string]map[string]SRGroupStatsSummary `json:"group_policy_mismatches,omitempty"`
}
// ReplDiagSite represents the replication site information
type ReplDiagSite struct {
Addr string `json:"addr,omitempty"`
DeploymentID string `json:"deployment_id"`
Online bool `json:"online,omitempty"`
}
// ReplDiagBucket represents the replication target information for a bucket
type ReplDiagBucket struct {
Name string `json:"name,omitempty"`
MetadataMismatches map[string]SRBucketStatsSummary `json:"metadata_mismatches,omitempty"`
Targets []BucketReplTarget `json:"targets,omitempty"`
}
type BucketReplTarget struct {
SourceBucket string `json:"source_bucket,omitempty"`
TargetBucket string `json:"target_bucket,omitempty"`
Addr string `json:"addr,omitempty"`
Online bool `json:"online,omitempty"`
TotalDowntime time.Duration `json:"total_downtime,omitempty"`
CurrentDowntime time.Duration `json:"current_downtime,omitempty"`
}