(ctx context.Context, ns, cluster string)
| 153 | } |
| 154 | |
| 155 | func (s *ClusterStore) GetCluster(ctx context.Context, ns, cluster string) (*Cluster, error) { |
| 156 | lock := s.getLock(ns, cluster) |
| 157 | lock.RLock() |
| 158 | defer lock.RUnlock() |
| 159 | |
| 160 | return s.getClusterWithoutLock(ctx, ns, cluster) |
| 161 | } |
| 162 | |
| 163 | func (s *ClusterStore) getClusterWithoutLock(ctx context.Context, ns, cluster string) (*Cluster, error) { |
| 164 | value, err := s.e.Get(ctx, buildClusterKey(ns, cluster)) |