Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TimedQueue (0.08 sec)

  1. pkg/controller/nodelifecycle/scheduler/rate_limited_queue.go

    	ProcessAt time.Time
    }
    
    // now is used to test time
    var now = time.Now
    
    // TimedQueue is a priority heap where the lowest ProcessAt is at the front of the queue
    type TimedQueue []*TimedValue
    
    // Len is the length of the queue.
    func (h TimedQueue) Len() int { return len(h) }
    
    // Less returns true if queue[i] < queue[j].
    func (h TimedQueue) Less(i, j int) bool { return h[i].ProcessAt.Before(h[j].ProcessAt) }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 07 07:50:01 UTC 2023
    - 8.2K bytes
    - Viewed (0)
  2. pkg/controller/nodelifecycle/scheduler/rate_limited_queue_test.go

    package scheduler
    
    import (
    	"reflect"
    	"testing"
    	"time"
    
    	"k8s.io/apimachinery/pkg/util/sets"
    	"k8s.io/client-go/util/flowcontrol"
    	"k8s.io/klog/v2/ktesting"
    )
    
    func CheckQueueEq(lhs []string, rhs TimedQueue) bool {
    	for i := 0; i < len(lhs); i++ {
    		if rhs[i].Value != lhs[i] {
    			return false
    		}
    	}
    	return true
    }
    
    func CheckSetEq(lhs, rhs sets.String) bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 07 17:40:33 UTC 2023
    - 10K bytes
    - Viewed (0)
Back to top