Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 119 for UpdateFunc (0.46 sec)

  1. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/dryrun_test.go

    	defer destroy()
    
    	obj := UnstructuredOrDie(`{"kind": "Pod"}`)
    
    	updateFunc := func(input runtime.Object, res storage.ResponseMeta) (output runtime.Object, ttl *uint64, err error) {
    		return input, nil, errors.New("UpdateFunction shouldn't be called")
    	}
    
    	err := s.GuaranteedUpdate(context.Background(), "key", obj, false, nil, updateFunc, true, nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  2. pilot/pkg/status/manager.go

    		return &IstioGenerationProvider{result}
    	}
    	result := &Controller{
    		fn:      wrapper,
    		workers: m.workers,
    	}
    	return result
    }
    
    type UpdateFunc func(status any, context any) GenerationProvider
    
    type Controller struct {
    	fn      UpdateFunc
    	workers WorkerQueue
    }
    
    // EnqueueStatusUpdateResource informs the manager that this controller would like to
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 24 04:04:42 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  3. pkg/kube/controllers/common.go

    	} else if e.AddFunc != nil {
    		e.AddFunc(Extract[T](obj))
    	}
    }
    
    func (e EventHandler[T]) OnUpdate(oldObj, newObj interface{}) {
    	if e.UpdateFunc != nil {
    		e.UpdateFunc(Extract[T](oldObj), Extract[T](newObj))
    	}
    }
    
    func (e EventHandler[T]) OnDelete(obj interface{}) {
    	if e.DeleteFunc != nil {
    		e.DeleteFunc(Extract[T](obj))
    	}
    }
    
    var _ cache.ResourceEventHandler = EventHandler[Object]{}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 11 08:27:29 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. plugin/pkg/auth/authorizer/node/graph_populator.go

    		graph: graph,
    	}
    
    	podHandler, _ := pods.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
    		AddFunc:    g.addPod,
    		UpdateFunc: g.updatePod,
    		DeleteFunc: g.deletePod,
    	})
    
    	pvsHandler, _ := pvs.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
    		AddFunc:    g.addPV,
    		UpdateFunc: g.updatePV,
    		DeleteFunc: g.deletePV,
    	})
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  5. pkg/registry/networking/networkpolicy/storage/storage_test.go

    	storage, server := newStorage(t)
    	defer server.Terminate(t)
    	defer storage.Store.DestroyFunc()
    	test := genericregistrytest.New(t, storage.Store)
    	test.TestUpdate(
    		// valid
    		validNetworkPolicy(),
    		// updateFunc
    		func(obj runtime.Object) runtime.Object {
    			object := obj.(*networking.NetworkPolicy)
    			object.Spec.Ingress = []networking.NetworkPolicyIngressRule{
    				{
    					From: []networking.NetworkPolicyPeer{
    						{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 18:19:25 UTC 2023
    - 5K bytes
    - Viewed (0)
  6. pkg/registry/apiserverinternal/storageversion/storage/storage_test.go

    	test.TestUpdate(
    		// valid
    		validStorageVersion(),
    		// updateFunc
    		func(obj runtime.Object) runtime.Object {
    			object := obj.(*apiserverinternal.StorageVersion)
    			update := &apiserverinternal.StorageVersion{
    				ObjectMeta: object.ObjectMeta,
    			}
    			return update
    		},
    		// invalid updateFunc
    		func(obj runtime.Object) runtime.Object {
    			object := obj.(*apiserverinternal.StorageVersion)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 06 07:26:18 UTC 2021
    - 5.4K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/util.go

    	"k8s.io/apimachinery/pkg/labels"
    	"k8s.io/apimachinery/pkg/runtime"
    )
    
    type SimpleUpdateFunc func(runtime.Object) (runtime.Object, error)
    
    // SimpleUpdateFunc converts SimpleUpdateFunc into UpdateFunc
    func SimpleUpdate(fn SimpleUpdateFunc) UpdateFunc {
    	return func(input runtime.Object, _ ResponseMeta) (runtime.Object, *uint64, error) {
    		out, err := fn(input)
    		return out, nil, err
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 08:05:06 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  8. pkg/registry/admissionregistration/validatingadmissionpolicy/storage/storage_test.go

    	test.TestUpdate(
    		// valid
    		validValidatingAdmissionPolicy(),
    		// updateFunc
    		func(obj runtime.Object) runtime.Object {
    			object := obj.(*admissionregistration.ValidatingAdmissionPolicy)
    			object.Labels = map[string]string{"c": "d"}
    			return object
    		},
    		// invalid updateFunc
    		func(obj runtime.Object) runtime.Object {
    			object := obj.(*admissionregistration.ValidatingAdmissionPolicy)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 07 23:43:34 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  9. pkg/registry/admissionregistration/validatingwebhookconfiguration/storage/storage_test.go

    	test.TestUpdate(
    		// valid
    		validValidatingWebhookConfiguration(),
    		// updateFunc
    		func(obj runtime.Object) runtime.Object {
    			object := obj.(*admissionregistration.ValidatingWebhookConfiguration)
    			object.Labels = map[string]string{"c": "d"}
    			return object
    		},
    		// invalid updateFunc
    		func(obj runtime.Object) runtime.Object {
    			object := obj.(*admissionregistration.ValidatingWebhookConfiguration)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 13 15:10:55 UTC 2023
    - 6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/peerproxy/peerproxy.go

    	h.storageversionInformer = svi.Informer()
    
    	svi.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
    		AddFunc: func(obj interface{}) {
    			h.addSV(obj)
    		},
    		UpdateFunc: func(oldObj, newObj interface{}) {
    			h.updateSV(oldObj, newObj)
    		},
    		DeleteFunc: func(obj interface{}) {
    			h.deleteSV(obj)
    		}})
    	return h
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 19 00:36:22 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top