Close stops health checks and cleans up resources.
()
| 297 | |
| 298 | // Close stops health checks and cleans up resources. |
| 299 | func (cc *ClusterClient) Close() { |
| 300 | cc.StopHealthCheck() |
| 301 | |
| 302 | cc.mu.Lock() |
| 303 | defer cc.mu.Unlock() |
| 304 | |
| 305 | cc.activeClient = nil |
| 306 | cc.activeProfile = "" |
| 307 | cc.activeIndex = -1 |
| 308 | cc.logger.Info("[CLUSTER] Cluster client closed for group '%s'", cc.groupName) |
| 309 | } |
| 310 | |
| 311 | // GetCandidateNames returns the names of all failover candidates in order. |
| 312 | func (cc *ClusterClient) GetCandidateNames() []string { |
nothing calls this directly
no test coverage detected