- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for addWatcher (0.21 sec)
-
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) -
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) -
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) -
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) -
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)