-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathreplication.go
144 lines (128 loc) · 6.39 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
//
// 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"
"github.com/minio/minio-go/v7/pkg/replication"
)
type ReplDiagInfo struct {
Error string `json:"error,omitempty"`
SREnabled bool `json:"site_replication_enabled"`
ActiveWorkers WorkerStat `json:"active_workers,omitempty"`
Queued InQueueMetric `json:"queued,omitempty"`
ReplicaCount int64 `json:"replica_count,omitempty"`
ReplicaSize int64 `json:"replica_size,omitempty"`
Proxying bool `json:"proxying,omitempty"`
Proxied ReplProxyMetric `json:"proxied,omitempty"`
Sites []ReplDiagSite `json:"sites,omitempty"`
RDReplicatedBuckets []ReplDiagReplBucket `json:"replicated_buckets,omitempty"`
}
type ReplDiagSite struct {
Addr string `json:"addr,omitempty"`
DeploymentID string `json:"deployment_id"`
Info ReplDiagSiteInfo `json:"info,omitempty"`
}
type ReplDiagSiteInfo struct {
Nodes []ReplDiagNode `json:"nodes,omitempty"`
LDAPEnabled bool `json:"ldap_enabled,omitempty"`
OpenIDEnabled bool `json:"openid_enabled,omitempty"`
BucketsCount int `json:"buckets_count,omitempty"`
Edge bool `json:"edge,omitempty"`
ILMEnabled bool `json:"ilm_enabled,omitempty"`
EncryptionEnabled bool `json:"encryption_enabled,omitempty"`
ILMExpiryReplication bool `json:"ilm_expiry_replication,omitempty"`
ObjectLockingEnabled bool `json:"object_locking_enabled,omitempty"`
Throttle ReplDiagThrottle `json:"throttle,omitempty"`
ReplicatedCount int64 `json:"replicated_count,omitempty"`
ReplicatedSize int64 `json:"replicated_size,omitempty"`
ResyncStatus string `json:"resync_status"`
}
type ReplDiagNode struct {
Addr string `json:"addr,omitempty"`
MinIOVersion string `json:"minio_version,omitempty"`
Uptime int64 `json:"uptime,omitempty"`
PoolID int `json:"poolid,omitempty"`
// SetID int `json:"setid,omitempty"`
IsLeader bool `json:"is_leader,omitempty"`
ILMExpiryInProgress bool `json:"ilm_expiry_in_progress,omitempty"`
}
type ReplDiagReplBucket struct {
Name string `json:"name,omitempty"`
ReplicationInfo ReplDiagBucketReplInfo `json:"replication_info,omitempty"`
ReplicationTargets []ReplDiagBucketReplTarget `json:"replication_targets,omitempty"`
}
type ReplDiagBucketReplTarget 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"`
AdminPermissions bool `json:"admin_permissions,omitempty"`
SyncReplication bool `json:"sync_replication,omitempty"`
HeartbeatErrCount int64 `json:"heartbeat_err_count,omitempty"`
BandwidthLimit uint64 `json:"bandwidth_limit,omitempty"`
Latency LatencyStat `json:"xfer_rate,omitempty"`
Edge bool `json:"edge,omitempty"`
HealthCheckDuration time.Duration `json:"heath_check,omitempty"`
DisableProxying bool `json:"disable_proxying"`
DeleteReplication bool `json:"delete_replication,omitempty"`
DeleteMarkerReplication bool `json:"delete_marker_replication,omitempty"`
ReplicationPriority int `json:"replication_priority,omitempty"`
ExistingObjectReplication bool `json:"existing_object_replication,omitempty"`
MetadataSync bool `json:"metadata_sync,omitempty"`
}
type ReplDiagBucketReplInfo struct {
VersionEnabled bool `json:"version_enabled,omitempty"`
ObjectLocking bool `json:"object_locking,omitempty"`
ExcludedPrefixes []string `json:"excluded_prefixes,omitempty"`
ILM ReplDiagILMInfo `json:"ilm,omitempty"`
Encryption ReplDiagEncInfo `json:"encryption,omitempty"`
Config replication.Config `json:"config,omitempty"`
Resync ReplDiagBucketResyncInfo `json:"resync,omitempty"`
}
type ReplDiagILMInfo struct {
Enabled bool `json:"enabled,omitempty"`
Rules []ReplDiagILMRule `json:"rules,omitempty"`
}
type ReplDiagILMRule struct {
ID string `json:"id,omitempty"`
Expiration bool `json:"expiration,omitempty"`
Transition bool `json:"transition,omitempty"`
}
type ReplDiagEncInfo struct {
Enabled bool `json:"enabled,omitempty"`
EncRules []BucketEncInfo `json:"enc_rules,omitempty"`
}
type BucketEncInfo struct {
Algorithm string `json:"algorithm,omitempty"`
EncKey string `json:"enc_key,omitempty"`
}
type ReplDiagBucketResyncInfo struct {
InProgress bool `json:"in_progress,omitempty"`
StartTime time.Time `json:"start_time,omitempty"`
FailedCount int64 `json:"failed_count,omitempty"`
FailedSize int64 `json:"failed_size,omitempty"`
ReplicatedCount int64 `json:"replicated_count,omitempty"`
ReplicatedSize int64 `json:"replicated_size,omitempty"`
}
type ReplDiagThrottle struct {
IsSet bool `json:"is_set,omitempty"`
Limit uint64 `json:"limit,omitempty"`
}