forked from Mirrors/minio
ilm: Make per-tier stats available via admin-tier-info (#13381)
This commit is contained in:
committed by
GitHub
parent
3b9dfa9d29
commit
939fbb3c38
@@ -225,6 +225,18 @@ func (o ObjectInfo) Clone() (cinfo ObjectInfo) {
|
||||
return cinfo
|
||||
}
|
||||
|
||||
func (o ObjectInfo) tierStats() tierStats {
|
||||
ts := tierStats{
|
||||
TotalSize: uint64(o.Size),
|
||||
NumVersions: 1,
|
||||
}
|
||||
// the current version of an object is accounted towards objects count
|
||||
if o.IsLatest {
|
||||
ts.NumObjects = 1
|
||||
}
|
||||
return ts
|
||||
}
|
||||
|
||||
// ReplicateObjectInfo represents object info to be replicated
|
||||
type ReplicateObjectInfo struct {
|
||||
ObjectInfo
|
||||
|
||||
Reference in New Issue
Block a user