Update vendored dependencies

This commit is contained in:
Nick Sardo 2017-07-31 13:35:10 -07:00
parent 65e8cecbac
commit 9b22796383
666 changed files with 38921 additions and 47120 deletions

View file

@ -147,6 +147,7 @@ type sharedIndexInformer struct {
// stopCh is the channel used to stop the main Run process. We have to track it so that
// late joiners can have a proper stop
stopCh <-chan struct{}
wg wait.Group
}
// dummyController hides the fact that a SharedInformer is different from a dedicated one
@ -204,12 +205,14 @@ func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) {
s.controller = New(cfg)
s.controller.(*controller).clock = s.clock
s.stopCh = stopCh
s.started = true
}()
s.stopCh = stopCh
s.cacheMutationDetector.Run(stopCh)
s.processor.run(stopCh)
defer s.wg.Wait()
s.wg.StartWithChannel(stopCh, s.cacheMutationDetector.Run)
s.wg.StartWithChannel(stopCh, s.processor.run)
s.controller.Run(stopCh)
}
@ -324,8 +327,8 @@ func (s *sharedIndexInformer) AddEventHandlerWithResyncPeriod(handler ResourceEv
s.processor.addListener(listener)
go listener.run(s.stopCh)
go listener.pop(s.stopCh)
s.wg.StartWithChannel(s.stopCh, listener.run)
s.wg.StartWithChannel(s.stopCh, listener.pop)
items := s.indexer.List()
for i := range items {
@ -395,13 +398,16 @@ func (p *sharedProcessor) distribute(obj interface{}, sync bool) {
}
func (p *sharedProcessor) run(stopCh <-chan struct{}) {
p.listenersLock.RLock()
defer p.listenersLock.RUnlock()
for _, listener := range p.listeners {
go listener.run(stopCh)
go listener.pop(stopCh)
}
var wg wait.Group
func() {
p.listenersLock.RLock()
defer p.listenersLock.RUnlock()
for _, listener := range p.listeners {
wg.StartWithChannel(stopCh, listener.run)
wg.StartWithChannel(stopCh, listener.pop)
}
}()
wg.Wait()
}
// shouldResync queries every listener to determine if any of them need a resync, based on each