- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for newDecoratedWatcher (0.17 sec)
-
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go
"k8s.io/apimachinery/pkg/watch" ) type decoratedWatcher struct { w watch.Interface decorator func(runtime.Object) cancel context.CancelFunc resultCh chan watch.Event } func newDecoratedWatcher(ctx context.Context, w watch.Interface, decorator func(runtime.Object)) *decoratedWatcher { ctx, cancel := context.WithCancel(ctx) d := &decoratedWatcher{ w: w, decorator: decorator, cancel: cancel,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 02 19:25:31 UTC 2021 - 2.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher_test.go
decorator := func(obj runtime.Object) { if pod, ok := obj.(*example.Pod); ok { pod.Annotations = map[string]string{"decorated": "true"} } } ctx, cancel := context.WithCancel(context.Background()) dw := newDecoratedWatcher(ctx, w, decorator) defer dw.Stop() go func() { w.Error(&metav1.Status{Status: "Failure"}) w.Add(&example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) w.Error(&metav1.Status{Status: "Failure"})
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 02 19:25:31 UTC 2021 - 3.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go
// optimization is skipped } w, err := e.Storage.Watch(ctx, key, storageOpts) if err != nil { return nil, err } if e.Decorator != nil { return newDecoratedWatcher(ctx, w, e.Decorator), nil } return w, nil } // calculateTTL is a helper for retrieving the updated TTL for an object or // returning an error if the TTL cannot be calculated. The defaultTTL is
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 19 23:22:44 UTC 2024 - 60.8K bytes - Viewed (0)