ilm: ObjectSizeLessThan and ObjectSizeGreaterThan (#18500)

This commit is contained in:
Krishnan Parthasarathi
2023-11-22 13:42:39 -08:00
committed by GitHub
parent e6b0fc465b
commit a93214ea63
7 changed files with 472 additions and 47 deletions

View File

@@ -282,6 +282,9 @@ func (lc Lifecycle) FilterRules(obj ObjectOpts) []Rule {
if !obj.DeleteMarker && !rule.Filter.TestTags(obj.UserTags) {
continue
}
if !obj.DeleteMarker && !rule.Filter.BySize(obj.Size) {
continue
}
rules = append(rules, rule)
}
return rules
@@ -293,6 +296,7 @@ type ObjectOpts struct {
Name string
UserTags string
ModTime time.Time
Size int64
VersionID string
IsLatest bool
DeleteMarker bool