- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for WaitUntilSynced (0.34 sec)
-
pkg/kube/krt/sync.go
package krt import "istio.io/istio/pkg/kube" type Syncer interface { 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) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 03 14:25:07 UTC 2024 - 1.8K bytes - Viewed (0) -
pkg/kube/krt/singleton_test.go
return ptr.Of(slices.Join(",", slices.Map(cms, func(c *corev1.ConfigMap) string { return config.NamespacedName(c).String() })...)) }, ) ConfigMapNames.AsCollection().Synced().WaitUntilSynced(stop) tt := assert.NewTracker[string](t) ConfigMapNames.Register(TrackerHandler[string](tt)) tt.WaitOrdered("add/") assert.Equal(t, *ConfigMapNames.Get(), "") cmt.Create(&corev1.ConfigMap{
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 11 08:27:29 UTC 2024 - 2.9K bytes - Viewed (0) -
pkg/kube/krt/index_test.go
pods := krt.Fetch(ctx, SimplePods, krt.FilterIndex(IPIndex, "1.2.3.5")) names := slices.Sort(slices.Map(pods, SimplePod.ResourceName)) return ptr.Of(strings.Join(names, ",")) }) Collection.AsCollection().Synced().WaitUntilSynced(stop) fetchSorted := func(ip string) []SimplePod { return slices.SortBy(IPIndex.Lookup(ip), func(t SimplePod) string { return t.ResourceName() }) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 09 19:55:53 UTC 2024 - 4.5K bytes - Viewed (0) -
pkg/kube/krt/join.go
} synced := make(chan struct{}) c := slices.Map(cs, func(e Collection[T]) internalCollection[T] { return e.(internalCollection[T]) }) go func() { for _, c := range c { if !c.Synced().WaitUntilSynced(o.stop) { return } } close(synced) log.Infof("%v synced", o.name) }()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 3.3K bytes - Viewed (0) -
pkg/kube/krt/collection.go
augmentation: opts.augmentation, synced: make(chan struct{}), stop: opts.stop, } go func() { // Wait for primary dependency to be ready if !c.Synced().WaitUntilSynced(h.stop) { return } // Now, register our handler. This will call Add() for the initial state // Locking here is tricky. We want to make sure we don't get duplicate events.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 19.4K bytes - Viewed (0) -
pkg/kube/krt/join_test.go
Labeled: Labeled{map[string]string{"app": "foo"}}, IP: "9.9.9.9", }) AllPods := krt.JoinCollection([]krt.Collection[SimplePod]{SimplePods, ExtraSimplePods.AsCollection()}) assert.Equal(t, AllPods.Synced().WaitUntilSynced(stop), true) // Assert Equal -- not EventuallyEqual -- to ensure our WaitForCacheSync is proper assert.Equal(t, fetcherSorted(AllPods)(), []SimplePod{
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 09 19:55:53 UTC 2024 - 6.1K bytes - Viewed (0) -
pkg/kube/krt/collection_test.go
SimplePods := SimplePodCollection(pods) SimpleServices := SimpleServiceCollection(services) SimpleEndpoints := SimpleEndpointsCollection(SimplePods, SimpleServices) assert.Equal(t, SimpleEndpoints.Synced().WaitUntilSynced(stop), true) // Assert Equal -- not EventuallyEqual -- to ensure our WaitForCacheSync is proper assert.Equal(t, fetcherSorted(SimpleEndpoints)(), []SimpleEndpoint{{"pod", "svc", "namespace", "1.2.3.4"}}) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Apr 28 04:22:19 UTC 2024 - 14.6K bytes - Viewed (0)