From 76ec0dac1eeeadd766a54a1fb7d07c4e56796b58 Mon Sep 17 00:00:00 2001 From: Mike Spreitzer Date: Sat, 4 May 2019 23:27:42 -0400 Subject: [PATCH] Fix comment on SharedInformer.Run The old wording suggested that `Run` only gets the controller started. Changed the wording to make it clear that `Run` only returns after the controller is stopped. Kubernetes-commit: fad9dec758be4dcc49735aea98ada2de46cff9fe --- tools/cache/shared_informer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cache/shared_informer.go b/tools/cache/shared_informer.go index d76ade8e..3271d959 100644 --- a/tools/cache/shared_informer.go +++ b/tools/cache/shared_informer.go @@ -103,7 +103,8 @@ type SharedInformer interface { GetStore() Store // GetController gives back a synthetic interface that "votes" to start the informer GetController() Controller - // Run starts the shared informer, which will be stopped when stopCh is closed. + // Run starts and runs the shared informer, returning after it stops. + // The informer will be stopped when stopCh is closed. Run(stopCh <-chan struct{}) // HasSynced returns true if the shared informer's store has been // informed by at least one full LIST of the authoritative state