Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 1,432 for stopCh (0.26 sec)

  1. pkg/kubelet/runtimeclass/runtimeclass_manager.go

    // Start starts syncing the RuntimeClass cache with the apiserver.
    func (m *Manager) Start(stopCh <-chan struct{}) {
    	m.informerFactory.Start(stopCh)
    }
    
    // WaitForCacheSync exposes the WaitForCacheSync method on the informer factory for testing
    // purposes.
    func (m *Manager) WaitForCacheSync(stopCh <-chan struct{}) {
    	m.informerFactory.WaitForCacheSync(stopCh)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 11 19:22:32 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  2. 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)
  3. pkg/controller/certificates/certificate_controller_test.go

    		handler,
    	)
    	controller.csrsSynced = func() bool { return true }
    
    	stopCh := make(chan struct{})
    	defer close(stopCh)
    	informerFactory.Start(stopCh)
    	informerFactory.WaitForCacheSync(stopCh)
    	wait.PollUntil(10*time.Millisecond, func() (bool, error) {
    		return controller.queue.Len() >= 1, nil
    	}, stopCh)
    	controller.processNextWorkItem(ctx)
    
    	actions := client.Actions()
    	if len(actions) != 1 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 15 03:26:08 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/net/util_test.go

    }
    
    func (lb *tcpLB) handleConnection(in net.Conn, stopCh chan struct{}) {
    	out, err := net.Dial("tcp", lb.serverURL)
    	if err != nil {
    		lb.t.Log(err)
    		return
    	}
    	go io.Copy(out, in)
    	go io.Copy(in, out)
    	<-stopCh
    	if err := out.Close(); err != nil {
    		lb.t.Fatalf("failed to close connection: %v", err)
    	}
    }
    
    func (lb *tcpLB) serve(stopCh chan struct{}) {
    	conn, err := lb.ln.Accept()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 20 19:02:55 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  5. pkg/test/framework/components/echo/kube/workload_manager.go

    	out, err := m.readyWorkloads()
    	m.mutex.Unlock()
    	return out, err
    }
    
    func (m *workloadManager) Start() error {
    	// Run the pod controller.
    	go m.podController.Run(m.stopCh)
    
    	// Wait for the cache to sync.
    	if !m.podController.WaitForSync(m.stopCh) {
    		return fmt.Errorf(
    			"failed syncing cache for echo %s/%s: controller stopping",
    			m.cfg.Namespace.Name(),
    			m.cfg.Service)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Aug 14 02:12:37 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/audit/types.go

    	// stopCh is closed, it is supposed to stop them. Run will be called before the first call to ProcessEvents.
    	Run(stopCh <-chan struct{}) error
    
    	// Shutdown will synchronously shut down the backend while making sure that all pending
    	// events are delivered. It can be assumed that this method is called after
    	// the stopCh channel passed to the Run method has been closed.
    	Shutdown()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 16 09:32:49 UTC 2018
    - 1.7K bytes
    - Viewed (0)
  7. pkg/test/echo/server/forwarder/executor.go

    const (
    	maxConcurrencyPerForward = 20
    )
    
    type executor struct {
    	totalRequests  *atomic.Uint64
    	activeRequests *atomic.Uint64
    	stopCh         chan struct{}
    }
    
    func newExecutor() *executor {
    	e := &executor{
    		totalRequests:  atomic.NewUint64(0),
    		activeRequests: atomic.NewUint64(0),
    		stopCh:         make(chan struct{}),
    	}
    
    	return e
    }
    
    func (e *executor) ActiveRequests() uint64 {
    	return e.activeRequests.Load()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 10 18:09:08 UTC 2022
    - 2K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top