Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 261 for stopCh (0.72 sec)

  1. pkg/proxy/config/api_test.go

    	stopCh := make(chan struct{})
    	defer close(stopCh)
    
    	handler := NewServiceHandlerMock()
    
    	sharedInformers := informers.NewSharedInformerFactory(client, time.Minute)
    
    	serviceConfig := NewServiceConfig(ctx, sharedInformers.Core().V1().Services(), time.Minute)
    	serviceConfig.RegisterEventHandler(handler)
    	go sharedInformers.Start(stopCh)
    	go serviceConfig.Run(stopCh)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer_test.go

    func TestWantsShutdownNotification(t *testing.T) {
    	stopCh := make(chan struct{})
    	target := initializer.New(nil, nil, nil, &TestAuthorizer{}, nil, stopCh, nil)
    	wantDrainedNotification := &WantDrainedNotification{}
    	target.Initialize(wantDrainedNotification)
    	if wantDrainedNotification.stopCh == nil {
    		t.Errorf("expected stopCh to be initialized but found nil")
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/plugin.go

    	c.restMapper = mapper
    }
    
    func (c *Plugin[H]) SetDynamicClient(client dynamic.Interface) {
    	c.dynamicClient = client
    }
    
    func (c *Plugin[H]) SetDrainedNotification(stopCh <-chan struct{}) {
    	c.stopCh = stopCh
    }
    
    func (c *Plugin[H]) SetAuthorizer(authorizer authorizer.Authorizer) {
    	c.authorizer = authorizer
    }
    
    func (c *Plugin[H]) SetMatcher(matcher *matching.Matcher) {
    	c.matcher = matcher
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 05 19:11:10 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. pilot/pkg/xds/discovery_test.go

    		wg.Wait()
    		c <- struct{}{}
    	}()
    	select {
    	case <-c:
    		return true
    	case <-time.After(timeout):
    		return false
    	}
    }
    
    func TestSendPushesManyPushes(t *testing.T) {
    	stopCh := make(chan struct{})
    	defer close(stopCh)
    
    	semaphore := make(chan struct{}, 2)
    	queue := NewPushQueue()
    	defer queue.ShutDown()
    
    	proxies := createProxies(5)
    
    	pushes := make(map[string]int)
    	pushesMu := &sync.Mutex{}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 00:26:45 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  5. pilot/pkg/serviceregistry/kube/controller/namespacecontroller.go

    	}))
    	return c
    }
    
    // Run starts the NamespaceController until a value is sent to stopCh.
    func (nc *NamespaceController) Run(stopCh <-chan struct{}) {
    	if !kube.WaitForCacheSync("namespace controller", stopCh, nc.namespaces.HasSynced, nc.configmaps.HasSynced) {
    		return
    	}
    
    	go nc.startCaBundleWatcher(stopCh)
    	nc.queue.Run(stopCh)
    	controllers.ShutdownAll(nc.configmaps, nc.namespaces)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 16:41:38 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer.go

    	authz authorizer.Authorizer,
    	featureGates featuregate.FeatureGate,
    	stopCh <-chan struct{},
    	restMapper meta.RESTMapper,
    ) pluginInitializer {
    	return pluginInitializer{
    		externalClient:    extClientset,
    		dynamicClient:     dynamicClient,
    		externalInformers: extInformers,
    		authorizer:        authz,
    		featureGates:      featureGates,
    		stopCh:            stopCh,
    		restMapper:        restMapper,
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go

    }
    
    // Run starts the EstablishingController.
    func (ec *EstablishingController) Run(stopCh <-chan struct{}) {
    	defer utilruntime.HandleCrash()
    	defer ec.queue.ShutDown()
    
    	klog.Info("Starting EstablishingController")
    	defer klog.Info("Shutting down EstablishingController")
    
    	if !cache.WaitForCacheSync(stopCh, ec.crdSynced) {
    		return
    	}
    
    	// only start one worker thread since its a slow moving API
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_progress.go

    	cond    *sync.Cond
    	waiting int
    	stopped bool
    }
    
    func (pr *conditionalProgressRequester) Run(stopCh <-chan struct{}) {
    	ctx := wait.ContextForChannel(stopCh)
    	if pr.contextMetadata != nil {
    		ctx = metadata.NewOutgoingContext(ctx, pr.contextMetadata)
    	}
    	go func() {
    		defer utilruntime.HandleCrash()
    		<-stopCh
    		pr.mux.Lock()
    		defer pr.mux.Unlock()
    		pr.stopped = true
    		pr.cond.Signal()
    	}()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 24 09:56:38 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. pkg/controlplane/controller/legacytokentracking/controller.go

    // Run starts the controller sync loop.
    func (c *Controller) Run(stopCh <-chan struct{}) {
    	defer utilruntime.HandleCrash()
    	defer c.queue.ShutDown()
    
    	klog.Info("Starting legacy_token_tracking_controller")
    	defer klog.Infof("Shutting down legacy_token_tracking_controller")
    
    	go c.configMapInformer.Run(stopCh)
    	if !cache.WaitForNamedCacheSync("configmaps", stopCh, c.configMapSynced) {
    		return
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 6K bytes
    - Viewed (0)
  10. pkg/controlplane/controller/systemnamespaces/system_namespaces_controller.go

    		interval:         interval,
    	}
    }
    
    // Run starts one worker.
    func (c *Controller) Run(stopCh <-chan struct{}) {
    	defer utilruntime.HandleCrash()
    	defer klog.Infof("Shutting down system namespaces controller")
    
    	klog.Infof("Starting system namespaces controller")
    
    	if !cache.WaitForCacheSync(stopCh, c.namespaceSynced) {
    		utilruntime.HandleError(fmt.Errorf("timed out waiting for caches to sync"))
    		return
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 12:19:56 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top