Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 105 for HasSynced (0.37 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. pkg/revisions/tag_watcher.go

    		return
    	}
    	// Notify handlers of initial state
    	p.notifyHandlers()
    	p.queue.Run(stopCh)
    }
    
    // AddHandler registers a new handler for updates to tag changes.
    func (p *tagWatcher) AddHandler(handler TagHandler) {
    	p.handlers = append(p.handlers, handler)
    }
    
    func (p *tagWatcher) HasSynced() bool {
    	return p.queue.HasSynced()
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 00:12:28 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  3. pkg/kube/multicluster/secretcontroller_test.go

    	tc.Run(stop)
    	retry.UntilOrFail(t, tc.controller.HasSynced, retry.Timeout(2*time.Second))
    }
    
    type informerHandler[T controllers.ComparableObject] struct {
    	client kclient.Client[T]
    }
    
    func (i *informerHandler[T]) Close() {
    	i.client.ShutdownHandlers()
    }
    
    func (i *informerHandler[T]) HasSynced() bool {
    	return i.client.HasSynced()
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  4. pkg/kube/kclient/crdwatcher.go

    		log.Infof("CRD %v version %v is below minimum version %v, ignoring", crd.Name, fv, mv)
    		return false
    	}
    	return true
    }
    
    // HasSynced returns whether the underlying cache has synced and the callback has been called at least once.
    func (c *crdWatcher) HasSynced() bool {
    	return c.queue.HasSynced()
    }
    
    // Run starts the controller. This must be called.
    func (c *crdWatcher) Run(stop <-chan struct{}) {
    	c.mutex.Lock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  5. pilot/pkg/controllers/untaint/nodeuntainter.go

    			n.queue.AddObject(o.New)
    		}
    	})
    }
    
    func (n *NodeUntainter) HasSynced() bool {
    	return n.queue.HasSynced()
    }
    
    func (n *NodeUntainter) Run(stop <-chan struct{}) {
    	kubelib.WaitForCacheSync("node untainer", stop, n.nodesClient.HasSynced, n.podsClient.HasSynced)
    	n.queue.Run(stop)
    	n.podsClient.ShutdownHandlers()
    	n.nodesClient.ShutdownHandlers()
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 13 00:50:31 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  6. pkg/kubelet/util/manager/watch_based_manager.go

    			// watches too often.
    			MinWatchTimeout: 30 * time.Minute,
    		},
    	)
    	item := &objectCacheItem{
    		refMap:    make(map[types.UID]int),
    		store:     store,
    		reflector: reflector,
    		hasSynced: func() (bool, error) { return store.hasSynced(), nil },
    		stopCh:    make(chan struct{}),
    	}
    
    	// Don't start reflector if Kubelet is already shutting down.
    	if !c.stopped {
    		go item.startReflector()
    	}
    	return item
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/internal/generic/controller.go

    	// clean up
    	waitGroup.Wait()
    
    	// Only way for workers to ever stop is for caller to cancel the context
    	return ctx.Err()
    }
    
    func (c *controller[T]) HasSynced() bool {
    	return c.hasProcessed.HasSynced()
    }
    
    func (c *controller[T]) runWorker() {
    	for {
    		key, shutdown := c.queue.Get()
    		if shutdown {
    			return
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. pilot/pkg/serviceregistry/kube/controller/controller.go

    				})
    			},
    		})
    }
    
    // HasSynced returns true after the initial state synchronization
    func (c *Controller) HasSynced() bool {
    	return c.queue.HasSynced() || c.initialSyncTimedout.Load()
    }
    
    func (c *Controller) informersSynced() bool {
    	if c.ambientIndex != nil && !c.ambientIndex.HasSynced() {
    		return false
    	}
    	return c.namespaces.HasSynced() &&
    		c.services.HasSynced() &&
    		c.endpoints.slices.HasSynced() &&
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 41.2K bytes
    - Viewed (0)
  9. pilot/pkg/config/kube/crdclient/client_test.go

    		events.Inc()
    	})
    	go c.Run(stop)
    	fake.RunAndWait(stop)
    	kube.WaitForCacheSync("test", stop, c.HasSynced)
    	// This MUST have been called by the time HasSynced returns true
    	assert.Equal(t, events.Load(), 1)
    }
    
    func TestAlternativeVersions(t *testing.T) {
    	fake := kube.NewFakeClient()
    	fake.RunAndWait(test.NewStop(t))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 02:58:52 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  10. pilot/pkg/serviceregistry/kube/controller/ambient/ambientindex.go

    }
    
    func (a *index) SyncAll() {
    	a.networkUpdateTrigger.TriggerRecomputation()
    }
    
    func (a *index) HasSynced() bool {
    	return a.services.Synced().HasSynced() &&
    		a.workloads.Synced().HasSynced() &&
    		a.waypoints.Synced().HasSynced() &&
    		a.authorizationPolicies.Synced().HasSynced()
    }
    
    type LookupNetwork func(endpointIP string, labels labels.Instance) network.ID
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 19 17:19:41 UTC 2024
    - 15.8K bytes
    - Viewed (0)
Back to top