- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for HasActiveRules (0.06 sec)
-
internal/bucket/replication/replication.go
} return false } // HasActiveRules - returns whether replication policy has active rules // Optionally a prefix can be supplied. // If recursive is specified the function will also return true if any level below the // prefix has active rules. If no prefix is specified recursive is effectively true. func (c Config) HasActiveRules(prefix string, recursive bool) bool { if len(c.Rules) == 0 {Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Mar 30 00:56:02 UTC 2025 - 8.9K bytes - Viewed (0) -
internal/bucket/lifecycle/evaluator.go
return e } // IsPendingReplication checks if the object is pending replication. func (e *Evaluator) IsPendingReplication(obj ObjectOpts) bool { if e.replCfg == nil { return false } if e.replCfg.HasActiveRules(obj.Name, true) && !obj.VersionPurgeStatus.Empty() { return true } return false } // IsObjectLocked checks if it is appropriate to remove an
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Tue Apr 08 15:41:24 UTC 2025 - 4.6K bytes - Viewed (0) -
internal/bucket/lifecycle/lifecycle.go
default: return xml.UnmarshalError(fmt.Sprintf("expected element type <Rule> but have <%s>", se.Name.Local)) } } } return nil } // HasActiveRules - returns whether lc has active rules at any level below or at prefix. func (lc Lifecycle) HasActiveRules(prefix string) bool { if len(lc.Rules) == 0 { return false } for _, rule := range lc.Rules { if rule.Status == Disabled { continue }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Thu Apr 03 06:45:06 UTC 2025 - 18.2K bytes - Viewed (0) -
internal/bucket/replication/replication_test.go
if err != nil { t.Fatalf("Got unexpected error: %v", err) } if got := cfg.HasActiveRules(tc.prefix, false); got != tc.expectedNonRec { t.Fatalf("Expected result with recursive set to false: `%v`, got: `%v`", tc.expectedNonRec, got) } if got := cfg.HasActiveRules(tc.prefix, true); got != tc.expectedRec {Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 32.4K bytes - Viewed (0) -
cmd/data-scanner.go
// If there are lifecycle rules for the prefix. _, prefix := path2BucketObjectWithBasePath(f.root, folder.name) var activeLifeCycle *lifecycle.Lifecycle if f.oldCache.Info.lifeCycle != nil && f.oldCache.Info.lifeCycle.HasActiveRules(prefix) { if f.dataUsageScannerDebug { console.Debugf(scannerLogPrefix+" Prefix %q has active rules\n", prefix) } activeLifeCycle = f.oldCache.Info.lifeCycle }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 45.5K bytes - Viewed (0) -
internal/bucket/lifecycle/lifecycle_test.go
} // To ensure input lifecycle configurations are valid if err := lc.Validate(lock.Retention{}); err != nil { t.Fatalf("Invalid test case: %d %v", i+1, err) } if got := lc.HasActiveRules(tc.prefix); got != tc.want { t.Fatalf("Expected result: `%v`, got: `%v`", tc.want, got) } }) } } func TestSetPredictionHeaders(t *testing.T) { lc := Lifecycle{ Rules: []Rule{
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 55.5K bytes - Viewed (0) -
cmd/xl-storage.go
lc, err = globalLifecycleSys.Get(cache.Info.Name) if err == nil && lc.HasActiveRules("") { cache.Info.lifeCycle = lc } } // Check if the current bucket has replication configuration var rcfg *replication.Config if rcfg, _, err = globalBucketMetadataSys.GetReplicationConfig(ctx, cache.Info.Name); err == nil { if rcfg.HasActiveRules("", true) {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 91.7K bytes - Viewed (0) -
cmd/bucket-handlers.go
case err != nil: if _, ok := err.(BucketReplicationConfigNotFound); !ok { writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMethodNotAllowed), r.URL) return } case rcfg != nil && rcfg.HasActiveRules("", true): writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMethodNotAllowed), r.URL) return } } } // Return an error if the bucket does not exist if !forceDelete {Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 63.9K bytes - Viewed (0) -
cmd/bucket-replication.go
c, err := getReplicationConfig(ctx, bucket) if err != nil || c == nil { replLogOnceIf(ctx, err, bucket) return false } for _, obj := range objects { if c.HasActiveRules(obj.ObjectName, true) { return true } } return false } // isStandardHeader returns true if header is a supported header and not a custom header
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 118.2K bytes - Viewed (0)