Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 13 of 13 for RegisterWatch (0.28 sec)

  1. pkg/kube/krt/singleton.go

    	v := d.val.Load()
    	if v == nil {
    		return nil
    	}
    	return []T{*v}
    }
    
    func (d *static[T]) Register(f func(o Event[T])) Syncer {
    	return registerHandlerAsBatched[T](d, f)
    }
    
    func (d *static[T]) RegisterBatch(f func(o []Event[T], initialSync bool), runExistingState bool) Syncer {
    	d.eventHandlers.Insert(f)
    	if runExistingState {
    		v := d.val.Load()
    		if v != nil {
    			f([]Event[T]{{
    				New:   v,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. pkg/kube/krt/informer.go

    		return &got
    	}
    	return nil
    }
    
    func (i *informer[I]) Register(f func(o Event[I])) Syncer {
    	return registerHandlerAsBatched[I](i, f)
    }
    
    func (i *informer[I]) RegisterBatch(f func(o []Event[I], initialSync bool), runExistingState bool) Syncer {
    	// Note: runExistingState is NOT respected here.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 10 11:01:46 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  3. pkg/kube/krt/collection_test.go

    			return a.(SizedPod).Size == pd.Labels["want-size"]
    		}))
    		return &PodSizeCount{
    			Named:         pd.Named,
    			MatchingSizes: len(matches),
    		}
    	})
    	tt := assert.NewTracker[string](t)
    	Thingys.RegisterBatch(BatchedTrackerHandler[PodSizeCount](tt), true)
    
    	assert.Equal(t, fetcherSorted(Thingys)(), nil)
    	pod := &corev1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "name",
    			Namespace: "namespace",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 04:22:19 UTC 2024
    - 14.6K bytes
    - Viewed (0)
Back to top