func NewSafeStore() SafeStoreInterface {
	return &SafeStore{
		items: map[string]*autoscalingv2.HorizontalPodAutoscaler{},
	}
}
NewSafeStore creates and returns a reference to an empty store. Operations
on the resulting set are thread safe.
package kubezstore
import (
	"sync"
	autoscalingv2 "k8s.io/api/autoscaling/v2beta2"
)
type SafeStoreInterface interface {
	Add(key string, obj *autoscalingv2.HorizontalPodAutoscaler)
	Update(key string, obj *autoscalingv2.HorizontalPodAutoscaler)
	Delete(key string)
	Get(key string) (*autoscalingv2.HorizontalPodAutoscaler, bool)
}
type SafeStore struct {
	lock  sync.RWMutex
	items map[string]*autoscalingv2.HorizontalPodAutoscaler
}
func (s *SafeStore) Get(key string) (*autoscalingv2.HorizontalPodAutoscaler, bool) {
	s.lock.Lock()
	defer s.lock.Unlock()
	item, exists := s.items[key]
	return item, exists
}
func (s *SafeStore) Add(key string, obj *autoscalingv2.HorizontalPodAutoscaler) {
	s.lock.Lock()
	defer s.lock.Unlock()
	s.items[key] = obj
}
func (s *SafeStore) Update(key string, obj *autoscalingv2.HorizontalPodAutoscaler) {
	s.lock.Lock()
	defer s.lock.Unlock()
	s.items[key] = obj
}
func (s *SafeStore) Delete(key string) {
	s.lock.Lock()
	defer s.lock.Unlock()
	if _, ok := s.items[key]; ok {
		delete(s.items, key)
	}
}