Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for WithRateLimiter (0.3 sec)

  1. pkg/kubelet/apis/grpc/ratelimit.go

    		if !limiter.Allow() {
    			return nil, ErrorLimitExceeded
    		}
    		return handler(ctx, req)
    	}
    }
    
    // WithRateLimiter creates new rate limiter with unary interceptor.
    func WithRateLimiter(serviceName string, qps, burstTokens int32) grpc.ServerOption {
    	qpsVal := gotimerate.Limit(qps)
    	burstVal := int(burstTokens)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 09 07:22:23 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. pkg/kube/controllers/queue.go

    }
    
    // WithName sets a name for the queue. This is used for logging
    func WithName(name string) func(q *Queue) {
    	return func(q *Queue) {
    		q.name = name
    	}
    }
    
    // WithRateLimiter allows defining a custom rate limiter for the queue
    func WithRateLimiter(r workqueue.RateLimiter) func(q *Queue) {
    	return func(q *Queue) {
    		q.queue = workqueue.NewRateLimitingQueue(r)
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 16:43:05 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  3. pkg/webhooks/webhookpatch.go

    		// If there is a conflict beyond this, it means Istiods are seeing different ca certs and are in inconsistent
    		// state for longer duration. Slowdown the retries, so that we do not overload kube api server and etcd.
    		controllers.WithRateLimiter(workqueue.NewItemFastSlowRateLimiter(100*time.Millisecond, 1*time.Minute, 5)),
    		// Webhook patching has to be retried forever. But the retries would be rate limited.
    		controllers.WithMaxAttempts(math.MaxInt))
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Sep 28 00:36:38 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  4. pkg/webhooks/validation/controller/controller.go

    		// the validation controller waits for its own service to be ready, so typically this takes a few seconds
    		// before we are ready; using FastSlow means we tend to always take the Slow time (1min).
    		controllers.WithRateLimiter(workqueue.NewItemExponentialFailureRateLimiter(100*time.Millisecond, 1*time.Minute)))
    
    	c.webhooks = kclient.NewFiltered[*kubeApiAdmission.ValidatingWebhookConfiguration](client, kclient.Filter{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 28 16:52:19 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  5. pkg/kubelet/server/server.go

    // ListenAndServePodResources initializes a gRPC server to serve the PodResources service
    func ListenAndServePodResources(endpoint string, providers podresources.PodResourcesProviders) {
    	server := grpc.NewServer(apisgrpc.WithRateLimiter("podresources", podresources.DefaultQPS, podresources.DefaultBurstTokens))
    
    	podresourcesapiv1alpha1.RegisterPodResourcesListerServer(server, podresources.NewV1alpha1PodResourcesServer(providers))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 40.1K bytes
    - Viewed (0)
Back to top