Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 526 for stopCh (0.25 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. pkg/proxy/config/config_test.go

    	stopCh := make(chan struct{})
    	defer close(stopCh)
    
    	sharedInformers := informers.NewSharedInformerFactory(client, time.Minute)
    
    	config := NewServiceConfig(ctx, sharedInformers.Core().V1().Services(), time.Minute)
    	handler := NewServiceHandlerMock()
    	config.RegisterEventHandler(handler)
    	go sharedInformers.Start(stopCh)
    	go config.Run(stopCh)
    
    	service := &v1.Service{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  3. pkg/kubelet/volumemanager/volume_manager_test.go

    			manager := newTestVolumeManager(t, tmpDir, podManager, kubeClient, node)
    
    			stopCh := runVolumeManager(manager)
    			defer close(stopCh)
    
    			podManager.SetPods([]*v1.Pod{pod})
    
    			// Fake node status update
    			go simulateVolumeInUseUpdate(
    				v1.UniqueVolumeName(node.Status.VolumesAttached[0].Name),
    				stopCh,
    				manager)
    
    			err = manager.WaitForAttachAndMount(context.Background(), pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  4. pkg/controller/resourcequota/resource_quota_monitor.go

    }
    
    // monitor runs a Controller with a local stop channel.
    type monitor struct {
    	controller cache.Controller
    
    	// stopCh stops Controller. If stopCh is nil, the monitor is considered to be
    	// not yet started.
    	stopCh chan struct{}
    }
    
    // Run is intended to be called in a goroutine. Multiple calls of this is an
    // error.
    func (m *monitor) Run() {
    	m.controller.Run(m.stopCh)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  5. plugin/pkg/admission/resourcequota/admission_test.go

    	return createHandlerWithConfig(kubeClient, informerFactory, nil, stopCh)
    }
    
    func createHandlerWithConfig(kubeClient kubernetes.Interface, informerFactory informers.SharedInformerFactory, config *resourcequotaapi.Configuration, stopCh chan struct{}) (*resourcequota.QuotaAdmission, error) {
    	if config == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:28:42 UTC 2024
    - 84.1K bytes
    - Viewed (0)
  6. pkg/controller/replicaset/replica_set_test.go

    	fakePodControl := controller.FakePodControl{}
    	stopCh := make(chan struct{})
    	defer close(stopCh)
    	manager, informers := testNewReplicaSetControllerFromClient(t, client, stopCh, BurstReplicas)
    
    	// 2 running pods, a controller with 2 replicas, sync is a no-op
    	labelMap := map[string]string{"foo": "bar"}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 69.2K bytes
    - Viewed (0)
  7. pkg/kubelet/util/manager/watch_based_manager.go

    	// lock is to ensure the access and modify of lastAccessTime, stopped, and immutable are thread safety,
    	// and protecting from closing stopCh multiple times.
    	lock           sync.Mutex
    	lastAccessTime time.Time
    	stopped        bool
    	immutable      bool
    	stopCh         chan struct{}
    }
    
    func (i *objectCacheItem) stop() bool {
    	i.lock.Lock()
    	defer i.lock.Unlock()
    	return i.stopThreadUnsafe()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top