Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for WithWatchTerminationDuringShutdown (0.49 sec)

  1. staging/src/k8s.io/apiserver/pkg/server/filters/watch_termination.go

    package filters
    
    import (
    	"errors"
    	"net/http"
    
    	"k8s.io/apiserver/pkg/endpoints/handlers/responsewriters"
    	apirequest "k8s.io/apiserver/pkg/endpoints/request"
    	"k8s.io/klog/v2"
    )
    
    func WithWatchTerminationDuringShutdown(handler http.Handler, termination apirequest.ServerShutdownSignal, wg RequestWaitGroup) http.Handler {
    	if termination == nil || wg == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 15:49:49 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/server/filters/watch_termination_test.go

    				if signal := apirequest.ServerShutdownSignalFrom(req.Context()); signal != nil {
    					signalGot, _ = signal.(*fakeServerShutdownSignal)
    				}
    				w.WriteHeader(http.StatusOK)
    			})
    
    			handler := WithWatchTerminationDuringShutdown(delegate, test.signal, test.wg)
    
    			req, err := http.NewRequest(http.MethodGet, "/apis/groups.k8s.io/v1/namespaces", nil)
    			if err != nil {
    				t.Fatalf("failed to create new http request - %v", err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 15:49:49 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go

    		select {
    		case <-s.ServerShuttingDownCh:
    			// the server has signaled that it is shutting down (not accepting
    			// any new request), all active watch request(s) should return
    			// immediately here. The WithWatchTerminationDuringShutdown server
    			// filter will ensure that the response to the client is rate
    			// limited in order to avoid any thundering herd issue when the
    			// client(s) try to reestablish the WATCH on the other
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 14 16:37:25 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/server/config.go

    	handler = genericfilters.WithWaitGroup(handler, c.LongRunningFunc, c.NonLongRunningRequestWaitGroup)
    	if c.ShutdownWatchTerminationGracePeriod > 0 {
    		handler = genericfilters.WithWatchTerminationDuringShutdown(handler, c.lifecycleSignals, c.WatchRequestWaitGroup)
    	}
    	if c.SecureServing != nil && !c.SecureServing.DisableHTTP2 && c.GoawayChance > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 47.7K bytes
    - Viewed (0)
Back to top