Delta fifo includes objects in DeleteFinalStateUnknow, rcs stop faster

This commit is contained in:
Prashanth Balasubramanian
2015-05-25 23:39:39 -07:00
parent 9067e94e5b
commit 8fa66bd962
6 changed files with 122 additions and 36 deletions

View File

@@ -361,6 +361,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 {