Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for clusterAdded (0.15 sec)

  1. pkg/kube/multicluster/fake.go

    }
    
    func (f *Fake) registerHandler(h handler) {
    	f.handlers = append(f.handlers, h)
    }
    
    func (f *Fake) Add(id cluster.ID, client kube.Client, stop chan struct{}) {
    	for _, handler := range f.handlers {
    		handler.clusterAdded(&Cluster{
    			ID:            id,
    			Client:        client,
    			kubeConfigSha: [32]byte{},
    			stop:          stop,
    		})
    	}
    }
    
    func (f *Fake) Delete(id cluster.ID) {
    	for _, handler := range f.handlers {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 23 19:18:21 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  2. pkg/kube/multicluster/component.go

    	if !f {
    		return nil
    	}
    	return &t
    }
    
    func (m *Component[T]) All() []T {
    	m.mu.RLock()
    	defer m.mu.RUnlock()
    	return maps.Values(m.clusters)
    }
    
    func (m *Component[T]) clusterAdded(cluster *Cluster) ComponentConstraint {
    	comp := m.constructor(cluster)
    	m.mu.Lock()
    	defer m.mu.Unlock()
    	m.clusters[cluster.ID] = comp
    	return comp
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 06 02:13:10 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  3. pkg/kube/multicluster/cluster.go

    	kube.SetObjectFilter(c.Client, filter)
    
    	syncers := make([]ComponentConstraint, 0, len(handlers))
    	for _, h := range handlers {
    		switch action {
    		case Add:
    			syncers = append(syncers, h.clusterAdded(c))
    		case Update:
    			syncers = append(syncers, h.clusterUpdated(c))
    		}
    	}
    	if !c.Client.RunAndWait(c.stop) {
    		log.Warnf("remote cluster %s failed to sync", c.ID)
    		return
    	}
    	for _, h := range syncers {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 06 02:13:10 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. pkg/kube/multicluster/secretcontroller.go

    		"Number of clusters managed by istiod",
    	)
    
    	localClusters  = clustersCount.With(clusterType.Value("local"))
    	remoteClusters = clustersCount.With(clusterType.Value("remote"))
    )
    
    type handler interface {
    	clusterAdded(cluster *Cluster) ComponentConstraint
    	clusterUpdated(cluster *Cluster) ComponentConstraint
    	clusterDeleted(clusterID cluster.ID)
    	HasSynced() bool
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 06 02:13:10 UTC 2024
    - 12.7K bytes
    - Viewed (0)
Back to top