SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
package s3lifecycle
import "time"
// MinTriggerAge returns the day threshold defined by kind on rule, or 0 if
// the kind has no day-style threshold (date / count / immediate). Callers
// use it as max(MinTriggerAge, kindFloor) when computing safety-scan cadence.
func MinTriggerAge(rule *Rule, kind ActionKind) time.Duration {
if rule == nil {
return 0
}
switch kind {
case ActionKindExpirationDays:
if rule.ExpirationDays > 0 {
return DaysToDuration(rule.ExpirationDays)
}
case ActionKindNoncurrentDays:
if rule.NoncurrentVersionExpirationDays > 0 {
return DaysToDuration(rule.NoncurrentVersionExpirationDays)
}
case ActionKindAbortMPU:
if rule.AbortMPUDaysAfterInitiation > 0 {
return DaysToDuration(rule.AbortMPUDaysAfterInitiation)
}
}
return 0
}