const blockTimeout …
const resourceVersionTooHighRetrySeconds …
const eventFreshDuration …
const defaultLowerBoundCapacity …
const defaultUpperBoundCapacity …
type watchCacheEvent …
type watchCache …
func newWatchCache(
keyFunc func(runtime.Object) (string, error),
eventHandler func(*watchCacheEvent),
getAttrsFunc func(runtime.Object) (labels.Set, fields.Set, error),
versioner storage.Versioner,
indexers *cache.Indexers,
clock clock.WithTicker,
groupResource schema.GroupResource,
progressRequester *conditionalProgressRequester) *watchCache { … }
func (w *watchCache) Add(obj interface{ … }
func (w *watchCache) Update(obj interface{ … }
func (w *watchCache) Delete(obj interface{ … }
func (w *watchCache) objectToVersionedRuntimeObject(obj interface{ … }
func (w *watchCache) processEvent(event watch.Event, resourceVersion uint64, updateFunc func(*storeElement) error) error { … }
func (w *watchCache) updateCache(event *watchCacheEvent) { … }
func (w *watchCache) resizeCacheLocked(eventTime time.Time) { … }
func (w *watchCache) isCacheFullLocked() bool { … }
func (w *watchCache) doCacheResizeLocked(capacity int) { … }
func (w *watchCache) UpdateResourceVersion(resourceVersion string) { … }
func (w *watchCache) List() []interface{ … }
func (w *watchCache) waitUntilFreshAndBlock(ctx context.Context, resourceVersion uint64) error { … }
type sortableStoreElements …
func (s sortableStoreElements) Len() int { … }
func (s sortableStoreElements) Less(i, j int) bool { … }
func (s sortableStoreElements) Swap(i, j int) { … }
func (w *watchCache) WaitUntilFreshAndList(ctx context.Context, resourceVersion uint64, key string, matchValues []storage.MatchValue) ([]interface{ … }
func (w *watchCache) waitUntilFreshAndListItems(ctx context.Context, resourceVersion uint64, key string, matchValues []storage.MatchValue) (result []interface{ … }
func filterPrefix(prefix string, items []interface{ … }
func (w *watchCache) notFresh(resourceVersion uint64) bool { … }
func (w *watchCache) WaitUntilFreshAndGet(ctx context.Context, resourceVersion uint64, key string) (interface{ … }
func (w *watchCache) ListKeys() []string { … }
func (w *watchCache) Get(obj interface{ … }
func (w *watchCache) GetByKey(key string) (interface{ … }
func (w *watchCache) Replace(objs []interface{ … }
func (w *watchCache) SetOnReplace(onReplace func()) { … }
func (w *watchCache) Resync() error { … }
func (w *watchCache) getListResourceVersion() uint64 { … }
func (w *watchCache) currentCapacity() int { … }
const minWatchChanSize …
const maxWatchChanSizeWithIndexAndTrigger …
const maxWatchChanSizeWithIndexWithoutTrigger …
const maxWatchChanSizeWithoutIndex …
func (w *watchCache) suggestedWatchChannelSize(indexExists, triggerUsed bool) int { … }
func (w *watchCache) isIndexValidLocked(index int) bool { … }
func (w *watchCache) getAllEventsSinceLocked(resourceVersion uint64, key string, opts storage.ListOptions) (*watchCacheInterval, error) { … }
func (w *watchCache) getIntervalFromStoreLocked(key string, matchesSingle bool) (*watchCacheInterval, error) { … }