(servers []string)
| 284 | } |
| 285 | |
| 286 | func (s *Proxy) SetSentinels(servers []string) error { |
| 287 | s.mu.Lock() |
| 288 | defer s.mu.Unlock() |
| 289 | if s.closed { |
| 290 | return ErrClosedProxy |
| 291 | } |
| 292 | s.ha.servers = servers |
| 293 | log.Warnf("[%p] set sentinels = %v", s, s.ha.servers) |
| 294 | |
| 295 | s.rewatchSentinels(s.ha.servers) |
| 296 | return nil |
| 297 | } |
| 298 | |
| 299 | func (s *Proxy) RewatchSentinels() error { |
| 300 | s.mu.Lock() |
no test coverage detected