- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for HasActiveRules (0.1 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 8.9K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 23 01:12:48 UTC 2024 - 17.9K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 21:10:34 UTC 2024 - 48.4K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 32.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 if rcfg, _, err := globalBucketMetadataSys.GetReplicationConfig(ctx, cache.Info.Name); err == nil { if rcfg.HasActiveRules("", true) { tgts, err := globalBucketTargetSys.ListBucketTargets(ctx, cache.Info.Name)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:58:27 UTC 2024 - 91.3K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 23 01:12:48 UTC 2024 - 55.1K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 12 12:24:04 UTC 2024 - 63.4K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 06:49:55 UTC 2024 - 116.1K bytes - Viewed (0)