Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 1,249 for stopCh (0.21 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller_test.go

    	stopCh := make(chan struct{})
    
    	env.runFunc = func() {
    		go c.Run(&spec.Swagger{
    			SwaggerProps: spec.SwaggerProps{
    				Paths: &spec.Paths{
    					Paths: map[string]spec.PathItem{
    						"/apis/apiextensions.k8s.io/v1": {},
    					},
    				},
    			},
    		}, h, stopCh)
    	}
    
    	env.cleanFunc = func() {
    		cancel()
    		close(stopCh)
    	}
    	return env, ctx
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 22 17:10:53 UTC 2023
    - 12.8K bytes
    - Viewed (0)
  2. pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go

    	}
    }
    
    func newWatcher(t *testing.T, socketDir string, desiredStateOfWorldCache cache.DesiredStateOfWorld, stopCh <-chan struct{}) *Watcher {
    	w := NewWatcher(socketDir, desiredStateOfWorldCache)
    	require.NoError(t, w.Start(stopCh))
    
    	return w
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 04 06:56:50 UTC 2023
    - 8K bytes
    - Viewed (0)
  3. pkg/kube/kclient/client.go

    	}
    	return cast
    }
    
    func (n *informerClient[T]) applyFilter(t T) bool {
    	if n.filter == nil {
    		return true
    	}
    	return n.filter(t)
    }
    
    func (n *informerClient[T]) Start(stopCh <-chan struct{}) {
    	n.startInformer(stopCh)
    }
    
    func (n *writeClient[T]) Create(object T) (T, error) {
    	api := kubeclient.GetWriteClient[T](n.client, object.GetNamespace())
    	return api.Create(context.Background(), object, metav1.CreateOptions{})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 17 07:14:28 UTC 2024
    - 13K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/controller_test.go

    		ExecSeatsGaugeVec:      metrics.PriorityLevelExecutionSeatsGaugeVec,
    		QueueSetFactory:        cts,
    	})
    
    	stopCh, controllerCompletedCh := make(chan struct{}), make(chan struct{})
    	var controllerErr error
    
    	informerFactory.Start(stopCh)
    
    	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
    	defer cancel()
    	status := informerFactory.WaitForCacheSync(ctx.Done())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  5. pkg/registry/core/service/portallocator/controller/repair.go

    func (c *Repair) RunUntil(onFirstSuccess func(), stopCh chan struct{}) {
    	c.broadcaster.StartRecordingToSink(stopCh)
    	defer c.broadcaster.Shutdown()
    
    	var once sync.Once
    	wait.Until(func() {
    		if err := c.runOnce(); err != nil {
    			runtime.HandleError(err)
    			return
    		}
    		once.Do(onFirstSuccess)
    	}, c.interval, stopCh)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  6. pkg/registry/apps/statefulset/storage/storage_test.go

    			return currentObject, nil
    		}
    	}
    	stopCh := make(chan struct{})
    	wg := &sync.WaitGroup{}
    	wg.Add(1)
    	go func() {
    		defer wg.Done()
    		// continuously submits a patch that updates a label and verifies the label update was effective
    		labelName := "timestamp"
    		for i := 0; ; i++ {
    			select {
    			case <-stopCh:
    				return
    			default:
    				expectedLabelValue := fmt.Sprint(i)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 14K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/server/genericapiserver_test.go

    		}
    		close(graceCh)
    	}()
    
    	// close stopCh after request sent to server to guarantee request handler is running.
    	wg.Wait()
    	close(stopCh)
    
    	time.Sleep(500 * time.Millisecond)
    	if _, err := http.Get("http://127.0.0.1:" + strconv.Itoa(serverPort) + "/200"); err == nil {
    		t.Errorf("Unexpected http success after stopCh was closed")
    	}
    
    	// wait for wait group handler finish
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 23.2K bytes
    - Viewed (0)
  8. pkg/kubelet/prober/prober_manager_test.go

    	setTestProbe(testPod, readiness, v1.Probe{})
    	m := newTestManager()
    	defer cleanup(t, m)
    
    	// Start syncing readiness without leaking goroutine.
    	stopCh := make(chan struct{})
    	go wait.Until(m.extractedReadinessHandling, 0, stopCh)
    	defer func() {
    		close(stopCh)
    		// Send an update to exit extractedReadinessHandling()
    		m.readinessManager.Set(kubecontainer.ContainerID{}, results.Success, &v1.Pod{})
    	}()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  9. pkg/registry/core/service/ipallocator/controller/repair.go

    func (c *Repair) RunUntil(onFirstSuccess func(), stopCh chan struct{}) {
    	c.broadcaster.StartRecordingToSink(stopCh)
    	defer c.broadcaster.Shutdown()
    
    	var once sync.Once
    	wait.Until(func() {
    		if err := c.runOnce(); err != nil {
    			runtime.HandleError(err)
    			return
    		}
    		once.Do(onFirstSuccess)
    	}, c.interval, stopCh)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  10. pkg/kubelet/volumemanager/volume_manager_fake.go

    	}
    	return &FakeVolumeManager{
    		volumes:       volumes,
    		reportedInUse: map[v1.UniqueVolumeName]bool{},
    	}
    }
    
    // Run is not implemented
    func (f *FakeVolumeManager) Run(sourcesReady config.SourcesReady, stopCh <-chan struct{}) {
    }
    
    // WaitForAttachAndMount is not implemented
    func (f *FakeVolumeManager) WaitForAttachAndMount(ctx context.Context, pod *v1.Pod) error {
    	return nil
    }
    
    // WaitForUnmount is not implemented
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 17 16:53:28 UTC 2023
    - 3.3K bytes
    - Viewed (0)
Back to top