- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 197 for HasSynced (0.14 sec)
-
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) -
pilot/pkg/config/memory/controller.go
c.hasSynced = cb } func (c *Controller) RegisterEventHandler(kind config.GroupVersionKind, f model.EventHandler) { c.monitor.AppendEventHandler(kind, f) } // HasSynced return whether store has synced // It can be controlled externally (such as by the data source), // otherwise it'll always consider synced. func (c *Controller) HasSynced() bool { if c.hasSynced != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jun 26 13:54:32 UTC 2023 - 4.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/quota/v1/generic/evaluator_test.go
// no more calls once we return true t.Fatalf("expected called=3, got %d", called) } } func TestProtectedLister(t *testing.T) { hasSynced := false notReadyErr := errors.New("not ready") fake := &fakeLister{} l := &protectedLister{ hasSynced: func() bool { return hasSynced }, notReadyErr: notReadyErr, delegate: fake, } if _, err := l.List(nil); err != notReadyErr {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 04 12:53:52 UTC 2020 - 3K bytes - Viewed (0) -
pkg/kube/watcher/configmapwatcher/configmapwatcher.go
c.configmaps.Start(stop) if !kube.WaitForCacheSync("configmap "+c.configMapName, stop, c.configmaps.HasSynced) { return } c.queue.Run(stop) } // HasSynced returns whether the underlying cache has synced and the callback has been called at least once. func (c *Controller) HasSynced() bool { return c.queue.HasSynced() } func (c *Controller) processItem(name types.NamespacedName) error {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 19 07:11:52 UTC 2023 - 2.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/quota/v1/generic/evaluator.go
return nil, err } return &protectedLister{ hasSynced: cachedHasSynced(informer.Informer().HasSynced), notReadyErr: fmt.Errorf("%v not yet synced", gvr), delegate: informer.Lister(), }, nil } } // cachedHasSynced returns a function that calls hasSynced() until it returns true once, then returns true func cachedHasSynced(hasSynced func() bool) func() bool { cache := &atomic.Bool{} cache.Store(false)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 05 00:02:47 UTC 2023 - 11.7K bytes - Viewed (0) -
pkg/test/framework/components/echo/kube/pod_controller.go
go c.informer.Run(stop) kube.WaitForCacheSync("pod controller", stop, c.informer.HasSynced) c.q.Run(stop) } func (c *podController) HasSynced() bool { return c.q.HasSynced() } func (c *podController) WaitForSync(stopCh <-chan struct{}) bool { return cache.WaitForNamedCacheSync("echo", stopCh, c.informer.HasSynced) } func (c *podController) LastSyncResourceVersion() string {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 09 02:22:47 UTC 2023 - 2.6K bytes - Viewed (0) -
pkg/kube/controllers/example_test.go
// is typically the same as the informer. c.pods.ShutdownHandlers() } // HasSynced asserts we have "synced", meaning we have processed the initial state. func (c *Controller) HasSynced() bool { // We could check `c.pods` as well, but it is redundant due to the Run() implementation. // Instead, just check `c.queue`. return c.queue.HasSynced() } // nolint: gocritic func Example() {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 7K bytes - Viewed (0) -
pkg/kube/kclient/delayed.go
s.handlers = append(s.handlers, h) } } func (s *delayedClient[T]) HasSynced() bool { if c := s.inf.Load(); c != nil { return (*c).HasSynced() } // If we haven't loaded the informer yet, we want to check if the delayed filter is synced. // This ensures that at startup, we only return HasSynced=true if we are sure the CRD is not ready. hs := s.delayed.HasSynced() return hs } func (s *delayedClient[T]) ShutdownHandlers() {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 31 02:32:59 UTC 2023 - 3.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/configuration/validating_webhook_manager.go
utilruntime.HandleError(fmt.Errorf("error getting webhook configuration: %v", err)) } return out } // HasSynced returns true if the initial set of validating webhook configurations // has been loaded. func (v *validatingWebhookConfigurationManager) HasSynced() bool { return v.hasSynced() } func (v *validatingWebhookConfigurationManager) getConfiguration() ([]webhook.WebhookAccessor, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jul 13 22:43:12 UTC 2023 - 5.7K bytes - Viewed (0) -
pkg/kube/multicluster/component.go
defer m.mu.Unlock() // If there is an old one, close it if old, f := m.clusters[cluster]; f { old.Close() } delete(m.clusters, cluster) } func (m *Component[T]) HasSynced() bool { for _, c := range m.All() { if !c.HasSynced() { return false } } return true } type KclientComponent[T controllers.ComparableObject] struct { internal *Component[kclientInternalComponent[T]] }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Mar 06 02:13:10 UTC 2024 - 3.4K bytes - Viewed (0)