(namespace, clusterName string)
| 198 | } |
| 199 | |
| 200 | func (c *Controller) getCluster(namespace, clusterName string) (*ClusterChecker, error) { |
| 201 | key := c.buildClusterKey(namespace, clusterName) |
| 202 | |
| 203 | c.mu.Lock() |
| 204 | defer c.mu.Unlock() |
| 205 | cluster, ok := c.clusters[key] |
| 206 | if !ok { |
| 207 | return nil, consts.ErrNotFound |
| 208 | } |
| 209 | return cluster, nil |
| 210 | } |
| 211 | |
| 212 | func (c *Controller) removeCluster(namespace, clusterName string) { |
| 213 | key := c.buildClusterKey(namespace, clusterName) |