Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for StopFunc (0.1 sec)

  1. staging/src/k8s.io/apimachinery/pkg/watch/watch.go

    	return pw.stopCh
    }
    
    // MockWatcher implements watch.Interface with mockable functions.
    type MockWatcher struct {
    	StopFunc       func()
    	ResultChanFunc func() <-chan Event
    }
    
    var _ Interface = &MockWatcher{}
    
    // Stop calls StopFunc
    func (mw MockWatcher) Stop() {
    	mw.StopFunc()
    }
    
    // ResultChan calls ResultChanFunc
    func (mw MockWatcher) ResultChan() <-chan Event {
    	return mw.ResultChanFunc()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 20:06:22 UTC 2024
    - 8.1K bytes
    - Viewed (1)
  2. pkg/scheduler/schedule_one_test.go

    				msg := truncateMessage(gotError.Error())
    				fwk.EventRecorder().Eventf(p.Pod, nil, v1.EventTypeWarning, "FailedScheduling", "Scheduling", msg)
    			}
    			called := make(chan struct{})
    			stopFunc, err := eventBroadcaster.StartEventWatcher(func(obj runtime.Object) {
    				e, _ := obj.(*eventsv1.Event)
    				if e.Reason != item.eventReason {
    					t.Errorf("got event %v, want %v", e.Reason, item.eventReason)
    				}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go

    		}
    		e.StorageVersioner = opts.StorageConfig.EncodeVersioner
    
    		if opts.CountMetricPollPeriod > 0 {
    			stopFunc := e.startObservingCount(opts.CountMetricPollPeriod, opts.StorageObjectCountTracker)
    			previousDestroy := e.DestroyFunc
    			var once sync.Once
    			e.DestroyFunc = func() {
    				once.Do(func() {
    					stopFunc()
    					if previousDestroy != nil {
    						previousDestroy()
    					}
    				})
    			}
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 19 23:22:44 UTC 2024
    - 60.8K bytes
    - Viewed (0)
Back to top