Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 444 for syncFn (0.13 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go

    		return false
    	}
    	defer ec.queue.Done(key)
    
    	err := ec.syncFn(key)
    	if err == nil {
    		ec.queue.Forget(key)
    		return true
    	}
    
    	utilruntime.HandleError(fmt.Errorf("%v failed with: %v", key, err))
    	ec.queue.AddRateLimited(key)
    
    	return true
    }
    
    // sync is used to turn CRDs into the Established state.
    func (ec *EstablishingController) sync(key string) error {
    	cachedCRD, err := ec.crdLister.Get(key)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/apiapproval_controller.go

    	// To allow injection for testing.
    	syncFn func(key string) error
    
    	queue workqueue.TypedRateLimitingInterface[string]
    
    	// last protectedAnnotation value this controller updated the condition per CRD name (to avoid two
    	// different version of the apiextensions-apiservers in HA to fight for the right message)
    	lastSeenProtectedAnnotationLock sync.Mutex
    	lastSeenProtectedAnnotation     map[string]string
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/nonstructuralschema_controller.go

    	crdSynced cache.InformerSynced
    
    	// To allow injection for testing.
    	syncFn func(key string) error
    
    	queue workqueue.TypedRateLimitingInterface[string]
    
    	// last generation this controller updated the condition per CRD name (to avoid two
    	// different version of the apiextensions-apiservers in HA to fight for the right message)
    	lastSeenGenerationLock sync.Mutex
    	lastSeenGeneration     map[string]int64
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapiv3/controller.go

    	crdLister  listers.CustomResourceDefinitionLister
    	crdsSynced cache.InformerSynced
    
    	// To allow injection for testing.
    	syncFn func(string) error
    
    	queue workqueue.TypedRateLimitingInterface[string]
    
    	openAPIV3Service *handler3.OpenAPIService
    
    	// specs per version and per CRD name
    	lock             sync.Mutex
    	specsByGVandName map[schema.GroupVersion]map[string]*spec3.OpenAPI
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go

    	crdsSynced cache.InformerSynced
    
    	// To allow injection for testing.
    	syncFn func(string) error
    
    	queue workqueue.TypedRateLimitingInterface[string]
    
    	staticSpec *spec.Swagger
    
    	openAPIService *handler.OpenAPIService
    
    	// specs by name. The specs are lazily constructed on request.
    	// The lock is for the map only.
    	lock        sync.Mutex
    	specsByName map[string]*specCache
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go

    		AddFunc:    c.addCustomResourceDefinition,
    		UpdateFunc: c.updateCustomResourceDefinition,
    		DeleteFunc: c.deleteCustomResourceDefinition,
    	})
    
    	c.syncFn = c.sync
    
    	return c
    }
    
    func (c *DiscoveryController) sync(version schema.GroupVersion) error {
    
    	apiVersionsForDiscovery := []metav1.GroupVersionForDiscovery{}
    	apiResourcesForDiscovery := []metav1.APIResource{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Apr 21 11:40:03 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go

    	crdInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
    		AddFunc:    c.addCustomResourceDefinition,
    		UpdateFunc: c.updateCustomResourceDefinition,
    	})
    
    	c.syncFn = c.sync
    
    	return c
    }
    
    func (c *CRDFinalizer) sync(key string) error {
    	cachedCRD, err := c.crdLister.Get(key)
    	if apierrors.IsNotFound(err) {
    		return nil
    	}
    	if err != nil {
    		return err
    	}
    
    	// no work to do
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go

    		AddFunc:    c.addCustomResourceDefinition,
    		UpdateFunc: c.updateCustomResourceDefinition,
    		DeleteFunc: c.deleteCustomResourceDefinition,
    	})
    
    	c.syncFn = c.sync
    
    	return c
    }
    
    func (c *NamingConditionController) getAcceptedNamesForGroup(group string) (allResources sets.String, allKinds sets.String) {
    	allResources = sets.String{}
    	allKinds = sets.String{}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  9. pkg/kube/krt/join.go

    	return res
    }
    
    func (j *join[T]) Register(f func(o Event[T])) Syncer {
    	return registerHandlerAsBatched[T](j, f)
    }
    
    func (j *join[T]) RegisterBatch(f func(o []Event[T], initialSync bool), runExistingState bool) Syncer {
    	sync := multiSyncer{}
    	for _, c := range j.collections {
    		sync.syncers = append(sync.syncers, c.RegisterBatch(f, runExistingState))
    	}
    	return sync
    }
    
    // nolint: unused // (not true, its to implement an interface)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  10. pkg/kube/krt/static.go

    	return maps.Values(s.vals)
    }
    
    func (s *staticList[T]) Register(f func(o Event[T])) Syncer {
    	return registerHandlerAsBatched(s, f)
    }
    
    func (s *staticList[T]) Synced() Syncer {
    	return alwaysSynced{}
    }
    
    func (s *staticList[T]) RegisterBatch(f func(o []Event[T], initialSync bool), runExistingState bool) Syncer {
    	if runExistingState {
    		f(slices.Map(s.List(), func(e T) Event[T] {
    			return Event[T]{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 2.1K bytes
    - Viewed (0)
Back to top