Merge pull request #8822 from bprashanth/fifo_rc

Wake up rcs when pods get DeletionFinalStateUnknown tombstones
This commit is contained in:
Wojciech Tyczynski
2015-05-28 10:50:28 +02:00
6 changed files with 122 additions and 36 deletions

View File

@@ -366,6 +366,16 @@ func (s *serviceCache) ListKeys() []string {
return keys
}
// GetByKey returns the value stored in the serviceMap under the given key
func (s *serviceCache) GetByKey(key string) (interface{}, bool, error) {
s.mu.Lock()
defer s.mu.Unlock()
if v, ok := s.serviceMap[key]; ok {
return v, true, nil
}
return nil, false, nil
}
// ListKeys implements the interface required by DeltaFIFO to list the keys we
// already know about.
func (s *serviceCache) allServices() []*cachedService {