You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ability to automatically stop on context cancellation was new functionality
that adds complexity and wasn't really used in Kubernetes. If someone wants
this, they can add it outside of the function.
A *WithLogger variant avoids the complexity and is consistent with
NewStreamWatcherWithLogger over in apimachinery.
Copy file name to clipboardExpand all lines: staging/src/k8s.io/client-go/tools/watch/informerwatcher.go
+5-21Lines changed: 5 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ limitations under the License.
17
17
package watch
18
18
19
19
import (
20
-
"context"
21
20
"sync"
22
21
23
22
"k8s.io/apimachinery/pkg/runtime"
@@ -107,18 +106,15 @@ func (e *eventProcessor) stop() {
107
106
// so you can use it anywhere where you'd have used a regular Watcher returned from Watch method.
108
107
// it also returns a channel you can use to wait for the informers to fully shutdown.
109
108
//
110
-
// Contextual logging: NewIndexerInformerWatcherWithContext should be used instead of NewIndexerInformerWatcher in code which supports contextual logging.
109
+
// Contextual logging: NewIndexerInformerWatcherWithLogger should be used instead of NewIndexerInformerWatcher in code which supports contextual logging.
0 commit comments