Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 342 for stopCh (0.17 sec)

  1. staging/src/k8s.io/apiserver/pkg/server/healthz.go

    // that we can register that the api-server is no longer ready while we attempt to gracefully
    // shutdown.
    func (s *GenericAPIServer) addReadyzShutdownCheck(stopCh <-chan struct{}) error {
    	return s.AddReadyzChecks(healthz.NewShutdownHealthz(stopCh))
    }
    
    // installHealthz creates the healthz endpoint for this server
    func (s *GenericAPIServer) installHealthz() {
    	s.healthzRegistry.installHandler(s.Handler.NonGoRestfulMux)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	cacher.reflector = reflector
    
    	go cacher.dispatchEvents()
    	go progressRequester.Run(stopCh)
    
    	cacher.stopWg.Add(1)
    	go func() {
    		defer cacher.stopWg.Done()
    		defer cacher.terminateAllWatchers()
    		wait.Until(
    			func() {
    				if !cacher.isStopped() {
    					cacher.startCaching(stopCh)
    				}
    			}, time.Second, stopCh,
    		)
    	}()
    
    	return cacher, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.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. pkg/kubelet/pleg/generic.go

    	g.runningMu.Lock()
    	defer g.runningMu.Unlock()
    	if !g.isRunning {
    		g.isRunning = true
    		g.stopCh = make(chan struct{})
    		go wait.Until(g.Relist, g.relistDuration.RelistPeriod, g.stopCh)
    	}
    }
    
    func (g *GenericPLEG) Stop() {
    	g.runningMu.Lock()
    	defer g.runningMu.Unlock()
    	if g.isRunning {
    		close(g.stopCh)
    		g.isRunning = false
    	}
    }
    
    func (g *GenericPLEG) Update(relistDuration *RelistDuration) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  5. pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go

    	// Wait for the completion of a loop that started after sources are all ready, then set hasAddedPods accordingly
    	klog.InfoS("Desired state populator starts to run")
    	wait.PollUntil(dswp.loopSleepDuration, func() (bool, error) {
    		done := sourcesReady.AllReady()
    		dswp.populatorLoop()
    		return done, nil
    	}, stopCh)
    	dswp.hasAddedPodsLock.Lock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 09:02:45 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  6. cmd/kube-scheduler/app/server.go

    		fmt.Fprintf(os.Stderr, "%v\n", err)
    		os.Exit(1)
    	}
    	cliflag.PrintFlags(cmd.Flags())
    
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    	go func() {
    		stopCh := server.SetupSignalHandler()
    		<-stopCh
    		cancel()
    	}()
    
    	cc, sched, err := Setup(ctx, opts, registryOptions...)
    	if err != nil {
    		return err
    	}
    	// add feature enablement metrics
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  7. pilot/pkg/bootstrap/certcontroller.go

    					log.Errorf("error watching %v: %v", tlsOptions.KeyFile, err)
    				case <-stop:
    					return
    				}
    			}
    		}()
    		return nil
    	})
    	return nil
    }
    
    func (s *Server) reloadIstiodCert(watchCh <-chan struct{}, stopCh <-chan struct{}) {
    	for {
    		select {
    		case <-stopCh:
    			return
    		case <-watchCh:
    			if err := s.loadIstiodCert(); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 17:48:28 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go

    		case <-ctx.Done():
    			return
    		}
    	}()
    	return nil
    }
    
    func (w *testWatchCache) Stop() {
    	close(w.stopCh)
    }
    
    func TestWatchCacheBasic(t *testing.T) {
    	store := newTestWatchCache(2, &cache.Indexers{})
    	defer store.Stop()
    
    	// Test Add/Update/Delete.
    	pod1 := makeTestPod("pod", 1)
    	if err := store.Add(pod1); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/config.go

    		if !s.isPostStartHookRegistered(genericApiServerHookName) {
    			err := s.AddPostStartHook(genericApiServerHookName, func(context PostStartHookContext) error {
    				c.SharedInformerFactory.Start(context.StopCh)
    				return nil
    			})
    			if err != nil {
    				return nil, err
    			}
    		}
    		// TODO: Once we get rid of /healthz consider changing this to post-start-hook.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 47.7K bytes
    - Viewed (0)
  10. pilot/pkg/serviceregistry/serviceentry/controller_test.go

    	if svc != nil {
    		t.Fatalf("expected nil, got %v", svc)
    	}
    }
    
    func BenchmarkServiceEntryHandler(b *testing.B) {
    	_, sd := initServiceDiscoveryWithoutEvents(b)
    	stopCh := make(chan struct{})
    	go sd.Run(stopCh)
    	defer close(stopCh)
    	for i := 0; i < b.N; i++ {
    		sd.serviceEntryHandler(config.Config{}, *httpDNS, model.EventAdd)
    		sd.serviceEntryHandler(config.Config{}, *httpDNSRR, model.EventAdd)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 92.9K bytes
    - Viewed (0)
Back to top