Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for newCacheInterval (0.17 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval_test.go

    	indexer := func(i int) *watchCacheEvent {
    		if len(events) == 0 {
    			return nil
    		}
    		return events[i]
    	}
    	indexValidator := func(_ int) bool { return true }
    
    	return newCacheInterval(startIndex, endIndex, indexer, indexValidator, locker)
    }
    
    func bufferFromEvents(events []*watchCacheEvent) *watchCacheIntervalBuffer {
    	wcib := &watchCacheIntervalBuffer{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval.go

    	lock sync.Locker
    }
    
    type attrFunc func(runtime.Object) (labels.Set, fields.Set, error)
    type indexerFunc func(int) *watchCacheEvent
    type indexValidator func(int) bool
    
    func newCacheInterval(startIndex, endIndex int, indexer indexerFunc, indexValidator indexValidator, locker sync.Locker) *watchCacheInterval {
    	return &watchCacheInterval{
    		startIndex:     startIndex,
    		endIndex:       endIndex,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go

    		return w.cache[(w.startIndex+i)%w.capacity].ResourceVersion > resourceVersion
    	}
    	first := sort.Search(size, f)
    	indexerFunc := func(i int) *watchCacheEvent {
    		return w.cache[i%w.capacity]
    	}
    	ci := newCacheInterval(w.startIndex+first, w.endIndex, indexerFunc, w.indexValidator, w.RWMutex.RLocker())
    	return ci, nil
    }
    
    // getIntervalFromStoreLocked returns a watchCacheInterval
    // that covers the entire storage state.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 10:20:57 UTC 2024
    - 26.2K bytes
    - Viewed (0)
Back to top