Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,061 for stopCh (0.11 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/factory.go

    func CreateHealthCheck(c storagebackend.Config, stopCh <-chan struct{}) (func() error, error) {
    	switch c.Type {
    	case storagebackend.StorageTypeETCD2:
    		return nil, fmt.Errorf("%s is no longer a supported storage backend", c.Type)
    	case storagebackend.StorageTypeUnset, storagebackend.StorageTypeETCD3:
    		return newETCD3HealthCheck(c, stopCh)
    	default:
    		return nil, fmt.Errorf("unknown storage type: %s", c.Type)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go

    func (s *shutdown) Check(req *http.Request) error {
    	select {
    	case <-s.stopCh:
    		return fmt.Errorf("process is shutting down")
    	default:
    	}
    	return nil
    }
    
    func (i *informerSync) Check(_ *http.Request) error {
    	stopCh := make(chan struct{})
    	// Close stopCh to force checking if informers are synced now.
    	close(stopCh)
    
    	informersByStarted := make(map[bool][]string)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_progress_test.go

    	_, ctx := ktesting.NewTestContext(t)
    	logger := klog.FromContext(ctx)
    
    	clock := testingclock.NewFakeClock(time.Now())
    	pr := newTestConditionalProgressRequester(clock)
    	stopCh := make(chan struct{})
    	go pr.Run(stopCh)
    	var wantRequestsSent int32
    	var requestsSent int32
    
    	logger.Info("Wait for ticker to be created")
    	for !clock.HasWaiters() {
    		time.Sleep(pollPeriod)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 11:51:06 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. pkg/kubelet/volumemanager/reconciler/reconciler.go

    */
    
    package reconciler
    
    import (
    	"k8s.io/apimachinery/pkg/util/wait"
    	"k8s.io/klog/v2"
    )
    
    func (rc *reconciler) Run(stopCh <-chan struct{}) {
    	rc.reconstructVolumes()
    	klog.InfoS("Reconciler: start to sync state")
    	wait.Until(rc.reconcile, rc.loopSleepDuration, stopCh)
    }
    
    func (rc *reconciler) reconcile() {
    	readyToUnmount := rc.readyToUnmount()
    	if readyToUnmount {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:23:12 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  5. pkg/registry/flowcontrol/rest/storage_flowcontrol.go

    	}
    
    	err = func() error {
    		// get a derived context that gets cancelled after 5m or
    		// when the StopCh gets closed, whichever happens first.
    		ctx, cancel := contextFromChannelAndMaxWaitDuration(hookContext.StopCh, 5*time.Minute)
    		defer cancel()
    
    		if !cache.WaitForCacheSync(ctx.Done(), bce.informersSynced...) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:35 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go

    				defer f.wg.Done()
    				informer.Run(stopCh)
    			}()
    			f.startedInformers[informerType] = true
    		}
    	}
    }
    
    func (f *sharedInformerFactory) Shutdown() {
    	f.lock.Lock()
    	f.shuttingDown = true
    	f.lock.Unlock()
    
    	// Will return immediately if there is nothing to wait for.
    	f.wg.Wait()
    }
    
    func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 18:31:26 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go

    				defer f.wg.Done()
    				informer.Run(stopCh)
    			}()
    			f.startedInformers[informerType] = true
    		}
    	}
    }
    
    func (f *sharedInformerFactory) Shutdown() {
    	f.lock.Lock()
    	f.shuttingDown = true
    	f.lock.Unlock()
    
    	// Will return immediately if there is nothing to wait for.
    	f.wg.Wait()
    }
    
    func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 18:31:26 UTC 2023
    - 9K bytes
    - Viewed (0)
  8. pkg/util/iptables/monitor_test.go

    		t.Errorf("failed to create iptables canaries: %v", err)
    	}
    
    	// If we close the stop channel, it should stop running
    	close(stopCh)
    
    	if err := waitForNoReload(&reloads, 2); err != nil {
    		t.Errorf("got unexpected number of reloads after stop: %v", err)
    	}
    	if !ensureNoChains(mfe) {
    		t.Errorf("canaries still exist after stopping monitor")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 08 15:21:59 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  9. pkg/kube/multicluster/secretcontroller_test.go

    	return t.component.clusters["config"]
    }
    
    func (t *testController) Run(stop chan struct{}) {
    	assert.NoError(t.t, t.controller.Run(stop))
    	t.client.RunAndWait(stop)
    }
    
    func TestListRemoteClusters(t *testing.T) {
    	stop := make(chan struct{})
    	c := buildTestController(t, false)
    	c.AddSecret("s0", "c0")
    	c.AddSecret("s1", "c1")
    	c.Run(stop)
    
    	// before sync
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  10. pkg/controller/garbagecollector/graph_builder.go

    	ignoredResources map[schema.GroupResource]struct{}
    }
    
    // monitor runs a Controller with a local stop channel.
    type monitor struct {
    	controller cache.Controller
    	store      cache.Store
    
    	// 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.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 36.9K bytes
    - Viewed (0)
Back to top