Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewEvaluator (0.05 sec)

  1. internal/bucket/lifecycle/evaluator_test.go

    					NewerNoncurrentVersions: retainVersions[i],
    					set:                     true,
    				},
    			})
    		}
    		return lc
    	}
    
    	lc := prepLifecycleCfg([]string{"tag3", "tag4", "tag5"}, []int{3, 4, 5})
    	evaluator := NewEvaluator(lc)
    	tagKeys := []string{"tag3", "tag3", "tag3", "tag4", "tag4", "tag5", "tag5"}
    	verIDs := []string{
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Tue Apr 08 15:41:24 UTC 2025
    - 5K bytes
    - Viewed (0)
  2. internal/bucket/lifecycle/evaluator.go

    type Evaluator struct {
    	policy        Lifecycle
    	lockRetention *objlock.Retention
    	replCfg       *replication.Config
    }
    
    // NewEvaluator - creates a new evaluator with the given lifecycle
    func NewEvaluator(policy Lifecycle) *Evaluator {
    	return &Evaluator{
    		policy: policy,
    	}
    }
    
    // WithLockRetention - sets the lock retention configuration for the evaluator
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Tue Apr 08 15:41:24 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  3. internal/bucket/lifecycle/lifecycle_test.go

    		IsLatest: true,
    		ModTime:  now,
    	}
    
    	obj2 := ObjectOpts{
    		Name:    "obj2",
    		ModTime: now,
    	}
    
    	// Go back seven days in the past
    	now = now.Add(7 * 24 * time.Hour)
    
    	evaluator := NewEvaluator(lc)
    	evts := evaluator.eval([]ObjectOpts{obj1, obj2}, now)
    	evt := evts[0]
    	if evt.Action != TransitionAction {
    		t.Fatalf("Expected action: %s but got %s", TransitionAction, evt.Action)
    	}
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 55.5K bytes
    - Viewed (0)
  4. cmd/data-scanner.go

    		return
    	}
    	objOpts := make([]lifecycle.ObjectOpts, len(objInfos))
    	for i, oi := range objInfos {
    		objOpts[i] = oi.ToLifecycleOpts()
    	}
    	evaluator := lifecycle.NewEvaluator(*i.lifeCycle).WithLockRetention(&lr).WithReplicationConfig(i.replication.Config)
    	events, err := evaluator.Eval(objOpts)
    	if err != nil {
    		// This error indicates that the objOpts passed to Eval is invalid.
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 45.5K bytes
    - Viewed (0)
Back to top