func (c *ProxyController) Run(stopCh <-chan struct{}, signalCh <-chan os.Signal) {
	glog.V(4).Infof("Running proxy controller")
	go wait.Until(c.HandleService, 0, stopCh)
	go wait.Until(c.HandleEndpoints, 0, stopCh)

	// Handle MASTER transition event
	go func() {
		for {
			sig := <-signalCh
			if sig == syscall.SIGUSR1 {
				glog.Infof("receive SIGUSR1 set MASTER true")
				// SIGUSR1 means in MASTER state
				c.Proxier.SetMaster(true)
			} else {
				glog.Infof("receive SIGUSR2 set MASTER false")
				c.Proxier.SetMaster(false)
			}
		}
	}()

	<-stopCh
}
// Run begins watching and syncing.
Run begins watching and syncing.
// Run begins watching and syncing .
func (c *ProxyController) Run(stopCh <-chan struct{}, signalCh <-chan os.Signal) {
	glog.V(4).Infof("Running proxy controller")
	go wait.Until(c.HandleService, 0, stopCh)
	go wait.Until(c.HandleEndpoints, 0, stopCh)
	go func() {
		for {
			sig := <-signalCh
			if sig == syscall.SIGUSR1 {
				glog.Infof("receive SIGUSR1 set MASTER true")
				c.Proxier.SetMaster(true)
			} else {
				glog.Infof("receive SIGUSR2 set MASTER false")
				c.Proxier.SetMaster(false)
			}
		}
	}()
	<-stopCh
}
func ( c * ProxyController ) Run ( stopCh <- chan struct { } , signalCh <- chan os . Signal ) { glog . V ( 4 ) . Infof ( " " ) go wait . Until ( c . HandleService , 0 , stopCh ) go wait . Until ( c . HandleEndpoints , 0 , stopCh ) go func ( ) { for { sig := <- signalCh if sig == syscall . SIGUSR1 { glog . Infof ( " " ) c . Proxier . SetMaster ( true ) } else { glog . Infof ( " " ) c . Proxier . SetMaster ( false ) } } } ( ) <- stopCh }
Run begins watching and syncing.
Run begins watching and syncing .
// Handle MASTER transition event // SIGUSR1 means in MASTER state