- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for NewRaceFreeFake (0.12 sec)
-
staging/src/k8s.io/apimachinery/pkg/watch/watch_test.go
f.Modify(testType("bar")) f.Delete(testType("bar")) f.Error(testType("error: blah")) f.Stop() } go sender() consumer(f) } func TestRaceFreeFake(t *testing.T) { f := NewRaceFreeFake() table := []struct { t EventType s testType }{ {Added, testType("foo")}, {Modified, testType("qux")}, {Modified, testType("bar")}, {Deleted, testType("bar")},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 15 11:34:31 UTC 2018 - 3.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/watch/watch.go
} // RaceFreeFakeWatcher lets you test anything that consumes a watch.Interface; threadsafe. type RaceFreeFakeWatcher struct { result chan Event Stopped bool sync.Mutex } func NewRaceFreeFake() *RaceFreeFakeWatcher { return &RaceFreeFakeWatcher{ result: make(chan Event, DefaultChanSize), } } // Stop implements Interface.Stop(). func (f *RaceFreeFakeWatcher) Stop() { f.Lock()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 20:06:22 UTC 2024 - 8.1K bytes - Viewed (1)