Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 89 for HasSynced (0.18 sec)

  1. pkg/kube/krt/sync.go

    	WaitUntilSynced(stop <-chan struct{}) bool
    	HasSynced() bool
    }
    
    var (
    	_ Syncer = channelSyncer{}
    	_ Syncer = pollSyncer{}
    )
    
    type channelSyncer struct {
    	name   string
    	synced <-chan struct{}
    }
    
    func (c channelSyncer) WaitUntilSynced(stop <-chan struct{}) bool {
    	return waitForCacheSync(c.name, stop, c.synced)
    }
    
    func (c channelSyncer) HasSynced() bool {
    	select {
    	case <-c.synced:
    		return true
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 03 14:25:07 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. pilot/pkg/config/memory/controller.go

    	c.hasSynced = cb
    }
    
    func (c *Controller) RegisterEventHandler(kind config.GroupVersionKind, f model.EventHandler) {
    	c.monitor.AppendEventHandler(kind, f)
    }
    
    // HasSynced return whether store has synced
    // It can be controlled externally (such as by the data source),
    // otherwise it'll always consider synced.
    func (c *Controller) HasSynced() bool {
    	if c.hasSynced != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 26 13:54:32 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. pkg/kube/watcher/configmapwatcher/configmapwatcher.go

    	c.configmaps.Start(stop)
    	if !kube.WaitForCacheSync("configmap "+c.configMapName, stop, c.configmaps.HasSynced) {
    		return
    	}
    	c.queue.Run(stop)
    }
    
    // HasSynced returns whether the underlying cache has synced and the callback has been called at least once.
    func (c *Controller) HasSynced() bool {
    	return c.queue.HasSynced()
    }
    
    func (c *Controller) processItem(name types.NamespacedName) error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 19 07:11:52 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  4. pkg/test/framework/components/echo/kube/pod_controller.go

    	go c.informer.Run(stop)
    	kube.WaitForCacheSync("pod controller", stop, c.informer.HasSynced)
    	c.q.Run(stop)
    }
    
    func (c *podController) HasSynced() bool {
    	return c.q.HasSynced()
    }
    
    func (c *podController) WaitForSync(stopCh <-chan struct{}) bool {
    	return cache.WaitForNamedCacheSync("echo", stopCh, c.informer.HasSynced)
    }
    
    func (c *podController) LastSyncResourceVersion() string {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 09 02:22:47 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  5. pkg/kube/controllers/example_test.go

    	// is typically the same as the informer.
    	c.pods.ShutdownHandlers()
    }
    
    // HasSynced asserts we have "synced", meaning we have processed the initial state.
    func (c *Controller) HasSynced() bool {
    	// We could check `c.pods` as well, but it is redundant due to the Run() implementation.
    	// Instead, just check `c.queue`.
    	return c.queue.HasSynced()
    }
    
    // nolint: gocritic
    func Example() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 7K bytes
    - Viewed (0)
  6. pkg/kube/kclient/delayed.go

    		s.handlers = append(s.handlers, h)
    	}
    }
    
    func (s *delayedClient[T]) HasSynced() bool {
    	if c := s.inf.Load(); c != nil {
    		return (*c).HasSynced()
    	}
    	// If we haven't loaded the informer yet, we want to check if the delayed filter is synced.
    	// This ensures that at startup, we only return HasSynced=true if we are sure the CRD is not ready.
    	hs := s.delayed.HasSynced()
    	return hs
    }
    
    func (s *delayedClient[T]) ShutdownHandlers() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 31 02:32:59 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/configuration/validating_webhook_manager.go

    		utilruntime.HandleError(fmt.Errorf("error getting webhook configuration: %v", err))
    	}
    	return out
    }
    
    // HasSynced returns true if the initial set of validating webhook configurations
    // has been loaded.
    func (v *validatingWebhookConfigurationManager) HasSynced() bool { return v.hasSynced() }
    
    func (v *validatingWebhookConfigurationManager) getConfiguration() ([]webhook.WebhookAccessor, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 13 22:43:12 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  8. pkg/kube/multicluster/component.go

    	defer m.mu.Unlock()
    	// If there is an old one, close it
    	if old, f := m.clusters[cluster]; f {
    		old.Close()
    	}
    	delete(m.clusters, cluster)
    }
    
    func (m *Component[T]) HasSynced() bool {
    	for _, c := range m.All() {
    		if !c.HasSynced() {
    			return false
    		}
    	}
    	return true
    }
    
    type KclientComponent[T controllers.ComparableObject] struct {
    	internal *Component[kclientInternalComponent[T]]
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 06 02:13:10 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/configuration/mutating_webhook_manager.go

    		utilruntime.HandleError(fmt.Errorf("error getting webhook configuration: %v", err))
    	}
    	return out
    }
    
    // HasSynced returns true if the initial set of mutating webhook configurations
    // has been loaded.
    func (m *mutatingWebhookConfigurationManager) HasSynced() bool { return m.hasSynced() }
    
    func (m *mutatingWebhookConfigurationManager) getConfiguration() ([]webhook.WebhookAccessor, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 13 22:43:12 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  10. pkg/revisions/default_watcher.go

    func (p *defaultWatcher) AddHandler(handler DefaultHandler) {
    	p.mu.Lock()
    	defer p.mu.Unlock()
    	p.handlers = append(p.handlers, handler)
    }
    
    func (p *defaultWatcher) HasSynced() bool {
    	return p.queue.HasSynced()
    }
    
    // notifyHandlers notifies all registered handlers on default revision change.
    // assumes externally locked.
    func (p *defaultWatcher) notifyHandlers() {
    	for _, handler := range p.handlers {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 09 02:22:47 UTC 2023
    - 3.1K bytes
    - Viewed (0)
Back to top