- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for withWaitGroup (0.2 sec)
-
staging/src/k8s.io/apiserver/pkg/server/filters/waitgroup.go
Add(delta int) error // Done decrements the WaitGroup counter. Done() } // WithWaitGroup adds all non long-running requests to wait group, which is used for graceful shutdown. func WithWaitGroup(handler http.Handler, longRunning apirequest.LongRunningRequestCheck, wg RequestWaitGroup) http.Handler { // NOTE: both WithWaitGroup and WithRetryAfter must use the same exact isRequestExemptFunc 'isRequestExemptFromRetryAfter,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jan 10 21:18:55 UTC 2023 - 3.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/with_retry_after.go
// // TODO: is there a way to merge WithWaitGroup and this filter? func WithRetryAfter(handler http.Handler, shutdownDelayDurationElapsedCh <-chan struct{}) http.Handler { shutdownRetryAfterParams := &retryAfterParams{ TearDownConnection: true, Message: "The apiserver is shutting down, please try again later.", }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 31 14:10:46 UTC 2021 - 4.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/with_retry_after_test.go
if test.safeWaitGroupIsWaiting { // mark the safe wait group as waiting, it's a blocking call // but since the WaitGroup counter is zero it should not block safeWG.Wait() } wrapped := WithWaitGroup(handler, func(*http.Request, *apirequest.RequestInfo) bool { return false }, safeWG) wrapped = WithRetryAfter(wrapped, test.shutdownDelayDurationElapsedFn())
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 31 14:10:46 UTC 2021 - 6.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/genericapiserver_test.go
config, _ := setUp(t) var graceShutdown bool wg := sync.WaitGroup{} wg.Add(1) config.BuildHandlerChainFunc = func(apiHandler http.Handler, c *Config) http.Handler { handler := genericfilters.WithWaitGroup(apiHandler, c.LongRunningFunc, c.NonLongRunningRequestWaitGroup) handler = genericapifilters.WithRequestInfo(handler, c.RequestInfoResolver) return handler }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 18:59:21 UTC 2024 - 23.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/genericapiserver_graceful_termination_test.go
} return true, nil }); err != nil { t.Errorf("Expected no error, but got: %v", err) } // TODO: our original intention was for any incoming request to receive a 503 // via the WithWaitGroup filter, but, at this point, any incoming requests // will get a 'connection refused' error since the net/http server has // stopped listening.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 18:59:21 UTC 2024 - 38.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/config.go
handler = genericapifilters.WithRequestDeadline(handler, c.AuditBackend, c.AuditPolicyRuleEvaluator, c.LongRunningFunc, c.Serializer, c.RequestTimeout) handler = genericfilters.WithWaitGroup(handler, c.LongRunningFunc, c.NonLongRunningRequestWaitGroup) if c.ShutdownWatchTerminationGracePeriod > 0 { handler = genericfilters.WithWatchTerminationDuringShutdown(handler, c.lifecycleSignals, c.WatchRequestWaitGroup)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 47.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go
// once NonLongRunningRequestWaitGroup.Wait is invoked, the apiserver is // expected to reject any incoming request with a {503, Retry-After} // response via the WithWaitGroup filter. On the contrary, we observe // that incoming request(s) get a 'connection refused' error, this is // because, at this point, we have called 'Server.Shutdown' and
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 18:59:21 UTC 2024 - 42.9K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go
handlerFunc = metrics.InstrumentHandlerFunc(verb, requestInfo.APIGroup, requestInfo.APIVersion, resource, subresource, scope, metrics.APIServerComponent, deprecated, "", handlerFunc) handler := genericfilters.WithWaitGroup(handlerFunc, longRunningFilter, crdInfo.waitGroup) handler.ServeHTTP(w, req) return } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 19:06:46 UTC 2024 - 52.9K bytes - Viewed (0)