- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for UpdateFunc (0.62 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go
return object, resourceVersion, nil } // processEvent is safe as long as there is at most one call to it in flight // at any point in time. func (w *watchCache) processEvent(event watch.Event, resourceVersion uint64, updateFunc func(*storeElement) error) error { metrics.EventsReceivedCounter.WithLabelValues(w.groupResource.String()).Inc() key, err := w.keyFunc(event.Object) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 10:20:57 UTC 2024 - 26.2K bytes - Viewed (0) -
pkg/kube/krt/informer.go
return controllers.EventHandler[I]{ AddExtendedFunc: func(obj I, initialSync bool) { handler(Event[I]{ New: &obj, Event: controllers.EventAdd, }, initialSync) }, UpdateFunc: func(oldObj, newObj I) { handler(Event[I]{ Old: &oldObj, New: &newObj, Event: controllers.EventUpdate, }, false) }, DeleteFunc: func(obj I) { handler(Event[I]{
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jun 10 11:01:46 UTC 2024 - 6.1K bytes - Viewed (0) -
pkg/kube/namespace/filter.go
// So we need to notify if we started selecting namespace if f.namespaceCreatedLocked(ns.ObjectMeta) { f.notifyHandlersLocked(sets.New(ns.Name), nil) } }, UpdateFunc: func(old, new *corev1.Namespace) { f.lock.Lock() defer f.lock.Unlock() membershipChanged, namespaceAdded := f.namespaceUpdatedLocked(old.ObjectMeta, new.ObjectMeta) if membershipChanged {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jun 10 17:12:52 UTC 2024 - 9.3K bytes - Viewed (0) -
pilot/pkg/config/kube/crdclient/client.go
AddFunc: func(obj controllers.Object) { incrementEvent(kind, "add") cl.queue.Push(func() error { cl.onEvent(resourceGVK, nil, obj, model.EventAdd) return nil }) }, UpdateFunc: func(old, cur controllers.Object) { incrementEvent(kind, "update") cl.queue.Push(func() error { cl.onEvent(resourceGVK, old, cur, model.EventUpdate) return nil }) },
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jun 14 00:12:28 UTC 2024 - 13.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go
t.Errorf("Unexpected error: %v", err) } updateFunc := func(input runtime.Object, res storage.ResponseMeta) (runtime.Object, *uint64, error) { return input, nil, nil } // GuaranteedUpdate without suggestion should return an error if err := store.GuaranteedUpdate(ctx, preset[1].key, &example.Pod{}, false, nil, updateFunc, nil); !storage.IsInternalError(err) { t.Errorf("Unexpected error: %v", err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 12:45:33 UTC 2024 - 91.4K bytes - Viewed (0) -
pkg/controller/job/job_controller.go
podBackoffStore: newBackoffStore(), } if _, err := jobInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { jm.addJob(logger, obj) }, UpdateFunc: func(oldObj, newObj interface{}) { jm.updateJob(logger, oldObj, newObj) }, DeleteFunc: func(obj interface{}) { jm.deleteJob(logger, obj) }, }); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 10 23:56:37 UTC 2024 - 77.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go
// GuaranteedUpdate implements storage.Interface. func (c *Cacher) GuaranteedUpdate( ctx context.Context, key string, destination runtime.Object, ignoreNotFound bool, preconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, _ runtime.Object) error { // Ignore the suggestion and try to pass down the current version of the object // read from cache. if elem, exists, err := c.watchCache.GetByKey(key); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 51.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go
podList.ListMeta = metav1.ListMeta{ResourceVersion: "100"} return d.err } func (d *dummyStorage) GuaranteedUpdate(_ context.Context, _ string, _ runtime.Object, _ bool, _ *storage.Preconditions, _ storage.UpdateFunc, _ runtime.Object) error { return fmt.Errorf("unimplemented") } func (d *dummyStorage) Count(_ string) (int64, error) { return 0, fmt.Errorf("unimplemented") } func (d *dummyStorage) injectError(err error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 82.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go
func (s *staleGuaranteedUpdateStorage) GuaranteedUpdate( ctx context.Context, key string, destination runtime.Object, ignoreNotFound bool, preconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, _ runtime.Object) error { return s.Interface.GuaranteedUpdate(ctx, key, destination, ignoreNotFound, preconditions, tryUpdate, s.cachedObj) } func TestDeleteWithCachedObject(t *testing.T) { podName := "foo"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 101.8K bytes - Viewed (0)