func newTestCacherWithoutSyncing(s storage.Interface) (*Cacher, storage.Versioner, error) { … }
func newTestCacher(s storage.Interface) (*Cacher, storage.Versioner, error) { … }
type dummyStorage …
func (d *dummyStorage) RequestWatchProgress(ctx context.Context) error { … }
func (d *dummyStorage) getRequestWatchProgressCounter() int { … }
type dummyWatch …
func (w *dummyWatch) ResultChan() <-chan watch.Event { … }
func (w *dummyWatch) Stop() { … }
func newDummyWatch() watch.Interface { … }
func (d *dummyStorage) Versioner() storage.Versioner { … }
func (d *dummyStorage) Create(_ context.Context, _ string, _, _ runtime.Object, _ uint64) error { … }
func (d *dummyStorage) Delete(_ context.Context, _ string, _ runtime.Object, _ *storage.Preconditions, _ storage.ValidateObjectFunc, _ runtime.Object, _ storage.DeleteOptions) error { … }
func (d *dummyStorage) Watch(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { … }
func (d *dummyStorage) Get(_ context.Context, _ string, _ storage.GetOptions, _ runtime.Object) error { … }
func (d *dummyStorage) GetList(ctx context.Context, resPrefix string, opts storage.ListOptions, listObj runtime.Object) error { … }
func (d *dummyStorage) GuaranteedUpdate(_ context.Context, _ string, _ runtime.Object, _ bool, _ *storage.Preconditions, _ storage.UpdateFunc, _ runtime.Object) error { … }
func (d *dummyStorage) Count(_ string) (int64, error) { … }
func (d *dummyStorage) ReadinessCheck() error { … }
func (d *dummyStorage) injectError(err error) { … }
func TestGetListCacheBypass(t *testing.T) { … }
func testGetListCacheBypass(t *testing.T, options storage.ListOptions, expectBypass bool) { … }
func TestConsistentReadFallback(t *testing.T) { … }
func TestGetListNonRecursiveCacheBypass(t *testing.T) { … }
func TestGetCacheBypass(t *testing.T) { … }
func TestWatchCacheBypass(t *testing.T) { … }
func TestTooManyRequestsNotReturned(t *testing.T) { … }
func TestEmptyWatchEventCache(t *testing.T) { … }
func TestWatchNotHangingOnStartupFailure(t *testing.T) { … }
func TestWatcherNotGoingBackInTime(t *testing.T) { … }
func TestCacherDontAcceptRequestsStopped(t *testing.T) { … }
func TestCacherDontMissEventsOnReinitialization(t *testing.T) { … }
func TestCacherNoLeakWithMultipleWatchers(t *testing.T) { … }
func testCacherSendBookmarkEvents(t *testing.T, allowWatchBookmarks, expectedBookmarks bool) { … }
func TestCacherSendBookmarkEvents(t *testing.T) { … }
func TestInitialEventsEndBookmark(t *testing.T) { … }
func TestCacherSendsMultipleWatchBookmarks(t *testing.T) { … }
func TestDispatchingBookmarkEventsWithConcurrentStop(t *testing.T) { … }
func TestBookmarksOnResourceVersionUpdates(t *testing.T) { … }
type fakeTimeBudget …
func (f *fakeTimeBudget) takeAvailable() time.Duration { … }
func (f *fakeTimeBudget) returnUnused(_ time.Duration) { … }
func TestStartingResourceVersion(t *testing.T) { … }
func TestDispatchEventWillNotBeBlockedByTimedOutWatcher(t *testing.T) { … }
func verifyEvents(t *testing.T, w watch.Interface, events []watch.Event, strictOrder bool) { … }
func TestCachingDeleteEvents(t *testing.T) { … }
func testCachingObjects(t *testing.T, watchersCount int) { … }
func TestCachingObjects(t *testing.T) { … }
func TestCacheIntervalInvalidationStopsWatch(t *testing.T) { … }
func TestWaitUntilWatchCacheFreshAndForceAllEvents(t *testing.T) { … }
type fakeStorage …
func newObjectStorage(fakePods []example.Pod) *fakeStorage { … }
func (m fakeStorage) GetList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { … }
func (m fakeStorage) Watch(_ context.Context, _ string, _ storage.ListOptions) (watch.Interface, error) { … }
func BenchmarkCacher_GetList(b *testing.B) { … }
func TestWatchListIsSynchronisedWhenNoEventsFromStoreReceived(t *testing.T) { … }
func TestForgetWatcher(t *testing.T) { … }
func TestGetWatchCacheResourceVersion(t *testing.T) { … }
func TestGetBookmarkAfterResourceVersionLockedFunc(t *testing.T) { … }
func TestWatchStreamSeparation(t *testing.T) { … }
func TestComputeListLimit(t *testing.T) { … }
func watchAndWaitForBookmark(t *testing.T, ctx context.Context, etcdStorage storage.Interface) func() (resourceVersion uint64) { … }
func forceRequestWatchProgressSupport(t *testing.T) { … }