Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CreateIndexWithDelegate (0.25 sec)

  1. pkg/kube/kclient/index.go

    		if controllers.IsNil(item) {
    			// This should be extremely rare, maybe impossible due to the mutex.
    			continue
    		}
    		res = append(res, item)
    	}
    	return res
    }
    
    // CreateIndexWithDelegate creates a simple index, keyed by key K, over an informer for O. This is similar to
    // Informer.AddIndex, but is easier to use and can be added after an informer has already started.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 04 03:49:30 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  2. pkg/revisions/tag_watcher.go

    	}))
    	p.webhooks = kclient.NewFiltered[*admissionregistrationv1.MutatingWebhookConfiguration](client, kubetypes.Filter{
    		ObjectFilter: kubetypes.NewStaticObjectFilter(isTagWebhook),
    	})
    	p.index = kclient.CreateIndexWithDelegate[string, *admissionregistrationv1.MutatingWebhookConfiguration](p.webhooks,
    		func(o *admissionregistrationv1.MutatingWebhookConfiguration) []string {
    			rev := o.GetLabels()[label.IoIstioRev.Name]
    			if rev == "" {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 00:12:28 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  3. pkg/kube/kclient/index_test.go

    func TestIndexDelegate(t *testing.T) {
    	c := kube.NewFakeClient()
    	pods := New[*corev1.Pod](c)
    	c.RunAndWait(test.NewStop(t))
    	var index *Index[string, *corev1.Pod]
    	adds := atomic.NewInt32(0)
    	index = CreateIndexWithDelegate[string, *corev1.Pod](pods, func(pod *corev1.Pod) []string {
    		return []string{pod.Spec.ServiceAccountName}
    	}, controllers.EventHandler[*corev1.Pod]{
    		AddFunc: func(obj *corev1.Pod) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 04 03:49:30 UTC 2023
    - 5.7K bytes
    - Viewed (0)
Back to top