Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for RequestWatchProgress (0.73 sec)

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

    	progressRequestPeriod = 100 * time.Millisecond
    )
    
    func newConditionalProgressRequester(requestWatchProgress WatchProgressRequester, clock TickerFactory, contextMetadata metadata.MD) *conditionalProgressRequester {
    	pr := &conditionalProgressRequester{
    		clock:                clock,
    		requestWatchProgress: requestWatchProgress,
    		contextMetadata:      contextMetadata,
    	}
    	pr.cond = sync.NewCond(&pr.mux)
    	return pr
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 24 09:56:38 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/feature/feature_support_checker.go

    	}
    }
    
    // Supports can check the featue from anywhere without storage if it was cached before.
    func (f *defaultFeatureSupportChecker) Supports(feature storage.Feature) bool {
    	switch feature {
    	case storage.RequestWatchProgress:
    		f.lock.Lock()
    		defer f.lock.Unlock()
    
    		return ptr.Deref(f.progressNotifySupported, false)
    	default:
    		runtime.HandleError(fmt.Errorf("feature %q is not implemented in DefaultFeatureSupportChecker", feature))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 11:56:42 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_progress_test.go

    	pr.conditionalProgressRequester = newConditionalProgressRequester(pr.RequestWatchProgress, clock, nil)
    	return pr
    }
    
    type testConditionalProgressRequester struct {
    	*conditionalProgressRequester
    	progressRequestsSentCount atomic.Int32
    }
    
    func (pr *testConditionalProgressRequester) RequestWatchProgress(ctx context.Context) error {
    	pr.progressRequestsSentCount.Add(1)
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 11:51:06 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/interfaces.go

    )
    
    // Feature is the name of each feature in storage that we check in feature_support_checker.
    type Feature = string
    
    // RequestWatchProgress is an etcd feature that may use to check if it supported or not.
    var RequestWatchProgress Feature = "RequestWatchProgress"
    
    // Versioner abstracts setting and retrieving metadata fields from database response
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 07:53:48 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/storage/feature/feature_support_checker_test.go

    			featureName: "some unknown feature",
    		},
    		{
    			testName:    "Disabled - with empty feature",
    			featureName: "",
    		},
    		{
    			testName:       "Disabled - default",
    			featureName:    storage.RequestWatchProgress,
    			expectedResult: false,
    		},
    	}
    
    	for _, tt := range tests {
    		t.Run(tt.testName, func(t *testing.T) {
    			var testFeatureSupportChecker FeatureSupportChecker = newDefaultFeatureSupportChecker()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 11:56:42 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	// expiredBookmarkWatchers is a list of watchers that were expired and need to be schedule for a next bookmark event
    	expiredBookmarkWatchers []*cacheWatcher
    }
    
    func (c *Cacher) RequestWatchProgress(ctx context.Context) error {
    	return c.storage.RequestWatchProgress(ctx)
    }
    
    // NewCacherFromConfig creates a new Cacher responsible for servicing WATCH and LIST requests from
    // its internal cache and updating its cache in the background based on the
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/list_work_estimator.go

    	consistentListFromCacheEnabled := utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache)
    	requestWatchProgressSupported := etcdfeature.DefaultFeatureSupportChecker.Supports(storage.RequestWatchProgress)
    
    	// Serve consistent reads from storage if ConsistentListFromCache is disabled
    	consistentReadFromStorage := resourceVersion == "" && !(consistentListFromCacheEnabled && requestWatchProgressSupported)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 11:56:42 UTC 2024
    - 7K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go

    	mockHandler := func(*watchCacheEvent) {}
    	wc := &testWatchCache{}
    	wc.bookmarkRevision = make(chan int64, 1)
    	wc.stopCh = make(chan struct{})
    	pr := newConditionalProgressRequester(wc.RequestWatchProgress, &immediateTickerFactory{}, nil)
    	go pr.Run(wc.stopCh)
    	wc.watchCache = newWatchCache(keyFunc, mockHandler, getAttrsFunc, versioner, indexers, testingclock.NewFakeClock(time.Now()), schema.GroupResource{Resource: "pods"}, pr)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go

    	pathPrefix          string
    	groupResource       schema.GroupResource
    	groupResourceString string
    	watcher             *watcher
    	leaseManager        *leaseManager
    }
    
    func (s *store) RequestWatchProgress(ctx context.Context) error {
    	// Use watchContext to match ctx metadata provided when creating the watch.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 11:56:42 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go

    	close(wc.resultChan)
    }
    
    func (wc *watchChan) Stop() {
    	wc.cancel()
    }
    
    func (wc *watchChan) ResultChan() <-chan watch.Event {
    	return wc.resultChan
    }
    
    func (wc *watchChan) RequestWatchProgress() error {
    	return wc.watcher.client.RequestProgress(wc.ctx)
    }
    
    // sync tries to retrieve existing data and send them to process.
    // The revision to watch will be set to the revision in response.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 10:26:38 UTC 2023
    - 18.9K bytes
    - Viewed (0)
Back to top