Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for addWatcher (0.34 sec)

  1. pilot/pkg/keycertbundle/watcher_test.go

    package keycertbundle
    
    import (
    	"bytes"
    	"os"
    	"path"
    	"testing"
    )
    
    func TestWatcher(t *testing.T) {
    	watcher := NewWatcher()
    
    	// 1. no key cert bundle
    	_, watch1 := watcher.AddWatcher()
    	select {
    	case bundle := <-watch1:
    		t.Errorf("watched unexpected keyCertBundle: %v", bundle)
    		return
    	default:
    	}
    
    	key := []byte("key")
    	cert := []byte("cert")
    	ca := []byte("caBundle")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 28 17:46:00 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  2. pilot/pkg/keycertbundle/watcher.go

    	watcherID int32
    	watchers  map[int32]chan struct{}
    }
    
    func NewWatcher() *Watcher {
    	return &Watcher{
    		watchers: make(map[int32]chan struct{}),
    	}
    }
    
    // AddWatcher returns channel to receive the updated items.
    func (w *Watcher) AddWatcher() (int32, chan struct{}) {
    	ch := make(chan struct{}, 1)
    	w.mutex.Lock()
    	defer w.mutex.Unlock()
    	id := w.watcherID
    	w.watchers[id] = ch
    	w.watcherID++
    
    	return id, ch
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 05 14:00:18 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/kube/controller/namespacecontroller.go

    }
    
    // startCaBundleWatcher listens for updates to the CA bundle and update cm in each namespace
    func (nc *NamespaceController) startCaBundleWatcher(stop <-chan struct{}) {
    	id, watchCh := nc.caBundleWatcher.AddWatcher()
    	defer nc.caBundleWatcher.RemoveWatcher(id)
    	for {
    		select {
    		case <-watchCh:
    			for _, ns := range nc.namespaces.List("", labels.Everything()) {
    				nc.namespaceChange(ns)
    			}
    		case <-stop:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 16:41:38 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  4. pkg/webhooks/webhookpatch.go

    	return err
    }
    
    // startCaBundleWatcher listens for updates to the CA bundle and patches the webhooks.
    func (w *WebhookCertPatcher) startCaBundleWatcher(stop <-chan struct{}) {
    	id, watchCh := w.CABundleWatcher.AddWatcher()
    	defer w.CABundleWatcher.RemoveWatcher(id)
    	for {
    		select {
    		case <-watchCh:
    			for _, whc := range w.webhooks.List("", klabels.Everything()) {
    				log.Debugf("updating caBundle for webhook %q", whc.Name)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Sep 28 00:36:38 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	valueWatchers map[string]watchersMap
    }
    
    func (i *indexedWatchers) addWatcher(w *cacheWatcher, number int, scope namespacedName, value string, supported bool) {
    	if supported {
    		if _, ok := i.valueWatchers[value]; !ok {
    			i.valueWatchers[value] = watchersMap{}
    		}
    		i.valueWatchers[value].addWatcher(w, number)
    	} else {
    		scopedWatchers, ok := i.allWatchers[scope]
    		if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  6. pkg/webhooks/validation/controller/controller.go

    func (c *Controller) startCaBundleWatcher(stop <-chan struct{}) {
    	if c.o.CABundleWatcher == nil {
    		return
    	}
    	id, watchCh := c.o.CABundleWatcher.AddWatcher()
    	defer c.o.CABundleWatcher.RemoveWatcher(id)
    
    	for {
    		select {
    		case <-watchCh:
    			c.syncAll()
    		case <-stop:
    			return
    		}
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 28 16:52:19 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go

    		"1",
    	)
    	forgetWatcherFn = forgetWatcher(cacher, w, 0, namespacedName{}, "", false)
    	addWatcher := func(w *cacheWatcher) {
    		cacher.Lock()
    		defer cacher.Unlock()
    
    		cacher.watchers.addWatcher(w, 0, namespacedName{}, "", false)
    	}
    
    	addWatcher(w)
    	assertCacherInternalState(1, 0)
    
    	forgetWatcherWrapped(false)
    	assertCacherInternalState(0, 0)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 82.9K bytes
    - Viewed (0)
  8. pilot/pkg/bootstrap/server.go

    func (s *Server) initIstiodCertLoader() error {
    	if err := s.loadIstiodCert(); err != nil {
    		return fmt.Errorf("first time load IstiodCert failed: %v", err)
    	}
    	_, watchCh := s.istiodCertBundleWatcher.AddWatcher()
    	s.addStartFunc("reload certs", func(stop <-chan struct{}) error {
    		go s.reloadIstiodCert(watchCh, stop)
    		return nil
    	})
    	return nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 17:48:28 UTC 2024
    - 46.3K bytes
    - Viewed (0)
  9. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/resolveengine/excludes/PatternMatchers.java

        private PatternMatchers() {
            addMatcher(ExactPatternMatcher.INSTANCE);
            addMatcher(RegexpPatternMatcher.INSTANCE);
            addMatcher(ExactOrRegexpPatternMatcher.INSTANCE);
            addMatcher(GlobPatternMatcher.INSTANCE);
        }
    
        private void addMatcher(PatternMatcher instance) {
            matchers.put(instance.getName(), instance);
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  10. test-site/activator-launch-1.3.2.jar

    public final org.apache.ivy.plugins.namespace.Namespace getNamespace(String); public final org.apache.ivy.plugins.namespace.Namespace getSystemNamespace(); public final org.apache.ivy.plugins.matcher.PatternMatcher getMatcher(String); private void addMatcher(org.apache.ivy.plugins.matcher.PatternMatcher); public final org.apache.ivy.core.cache.RepositoryCacheManag getRepositoryCacheMa(String); public final void addRepositoryCacheMa(org.apache.ivy.core.cache.RepositoryCacheManag); private void addRe...
    Registered: Wed Jun 12 15:38:08 UTC 2024
    - Last Modified: Mon Apr 20 08:41:37 UTC 2015
    - 1.2M bytes
    - Viewed (1)
Back to top