Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for finishFunc (0.17 sec)

  1. pkg/registry/certificates/certificates/storage/metrics_test.go

    			t.Parallel()
    
    			testReq := &testCounterVecMetric{}
    			testHon := &testCounterVecMetric{}
    
    			finishFunc, err := countCSRDurationMetric(testReq, testHon)(nil, tt.obj, tt.old, tt.options)
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			finishFunc(nil, tt.success)
    
    			if got := testReq.signer; tt.wantRequested && tt.wantSigner != got {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 15 14:34:53 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go

    			setAnn(obj, "AfterCreateWasCalled")
    		},
    		expectAnnotation: "AfterCreateWasCalled",
    	}, {
    		name: "BeginCreate mutation",
    		beginCreate: func(_ context.Context, obj runtime.Object, _ *metav1.CreateOptions) (FinishFunc, error) {
    			setAnn(obj, "BeginCreateWasCalled")
    			return func(context.Context, bool) {}, nil
    		},
    		expectAnnotation: "BeginCreateWasCalled",
    	}, {
    		name: "success ordering",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 101.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go

    	utilfeature "k8s.io/apiserver/pkg/util/feature"
    	flowcontrolrequest "k8s.io/apiserver/pkg/util/flowcontrol/request"
    	"k8s.io/client-go/tools/cache"
    
    	"k8s.io/klog/v2"
    )
    
    // FinishFunc is a function returned by Begin hooks to complete an operation.
    type FinishFunc func(ctx context.Context, success bool)
    
    // AfterDeleteFunc is the type used for the Store.AfterDelete hook.
    type AfterDeleteFunc func(obj runtime.Object, options *metav1.DeleteOptions)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 19 23:22:44 UTC 2024
    - 60.8K bytes
    - Viewed (0)
  4. pkg/registry/certificates/certificates/storage/metrics.go

    }
    
    func countCSRDurationMetric(requested, honored counterVecMetric) genericregistry.BeginUpdateFunc {
    	return func(ctx context.Context, obj, old runtime.Object, options *metav1.UpdateOptions) (genericregistry.FinishFunc, error) {
    		return func(ctx context.Context, success bool) {
    			if !success {
    				return // ignore failures
    			}
    
    			if dryrun.IsDryRun(options.DryRun) {
    				return // ignore things that would not get persisted
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 18 21:41:43 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  5. pkg/registry/core/service/storage/storage.go

    		}
    
    		r.alloc.releaseAllocatedResources(svc)
    	}
    }
    
    func (r *REST) beginCreate(ctx context.Context, obj runtime.Object, options *metav1.CreateOptions) (genericregistry.FinishFunc, error) {
    	svc := obj.(*api.Service)
    
    	// Make sure ClusterIP and ClusterIPs are in sync.  This has to happen
    	// early, before anyone looks at them.
    	normalizeClusterIPs(After{svc}, Before{nil})
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 11 13:09:33 UTC 2024
    - 22.3K bytes
    - Viewed (0)
Back to top