(namespace, clusterName string)
| 220 | } |
| 221 | |
| 222 | func (c *Controller) updateCluster(namespace, clusterName string) { |
| 223 | key := c.buildClusterKey(namespace, clusterName) |
| 224 | c.mu.Lock() |
| 225 | cluster, ok := c.clusters[key] |
| 226 | c.mu.Unlock() |
| 227 | if !ok { |
| 228 | logger.Get().With( |
| 229 | zap.String("namespace", namespace), |
| 230 | zap.String("clusterName", clusterName), |
| 231 | ).Error("Cluster not found") |
| 232 | return |
| 233 | } |
| 234 | cluster.sendSyncEvent() |
| 235 | } |
| 236 | |
| 237 | func (c *Controller) Close() { |
| 238 | if !c.state.CompareAndSwap(stateRunning, stateClosed) { |
no test coverage detected