Skip to content

Instantly share code, notes, and snippets.

@treacher
Created August 29, 2017 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save treacher/193752d47f7f70150e28bfec4bcd00aa to your computer and use it in GitHub Desktop.
Save treacher/193752d47f7f70150e28bfec4bcd00aa to your computer and use it in GitHub Desktop.
// Run starts the process for listening for namespace changes and acting upon those changes.
func (c *NamespaceController) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) {
// When this function completes, mark the go function as done
defer wg.Done()
// Increment wait group as we're about to execute a go function
wg.Add(1)
// Execute go function
go c.namespaceInformer.Run(stopCh)
// Wait till we receive a stop signal
<-stopCh
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment