- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for resultChan (0.36 sec)
-
staging/src/k8s.io/apimachinery/pkg/watch/watch.go
// must always be called, even if the consumer has not yet called // ResultChan(). // // Only the consumer should call Stop(), not the producer. If the producer // errors and needs to stop the watch prematurely, it should instead send // an error event and close the result channel. Stop() // ResultChan returns a channel which will receive events from the event
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 20:06:22 UTC 2024 - 8.1K bytes - Viewed (1) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go
}() // We expect all init events to be delivered. for i := 0; i < numObjects; i++ { <-w.ResultChan() } // We don't expect any other event to be delivered and thus // the ResultChan to be closed. result, ok := <-w.ResultChan() if ok { t.Errorf("unexpected event: %#v", result) } wg.Wait() } func TestTimeBucketWatchersBasic(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 09:20:10 UTC 2024 - 22.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go
d.RLock() defer d.RUnlock() return d.requestWatchProgressCounter } type dummyWatch struct { ch chan watch.Event } func (w *dummyWatch) ResultChan() <-chan watch.Event { return w.ch } func (w *dummyWatch) Stop() { close(w.ch) } func newDummyWatch() watch.Interface { return &dummyWatch{ ch: make(chan watch.Event), } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 82.9K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/test/integration/change_test.go
w, err := noxuNamespacedResourceClient.Watch(context.TODO(), metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error establishing watch: %v", err) return } for event := range w.ResultChan() { switch event.Type { case watch.Added, watch.Modified, watch.Deleted: // all expected default: t.Errorf("unexpected watch event: %#v", event) } } }(i) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 06 13:59:03 UTC 2024 - 5.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 51.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go
if _, err := registry.DeleteCollection(testContext, rest.ValidateAllObjectFunc, nil, &metainternalversion.ListOptions{}); err != nil { t.Fatalf("Unexpected error: %v", err) } got, open := <-watcher.ResultChan() if !open { t.Errorf("Unexpected channel close") } else { if got.Type != "DELETED" { t.Errorf("Unexpected event type: %s", got.Type) } gotObject := got.Object.(*example.Pod)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 101.8K bytes - Viewed (0)