MCPcopy
hub / github.com/CodisLabs/codis / SwitchMasters

Method SwitchMasters

pkg/proxy/proxy.go:263–275  ·  view source on GitHub ↗
(masters map[int]string)

Source from the content-addressed store, hash-verified

261}
262
263func (s *Proxy) SwitchMasters(masters map[int]string) error {
264 s.mu.Lock()
265 defer s.mu.Unlock()
266 if s.closed {
267 return ErrClosedProxy
268 }
269 s.ha.masters = masters
270
271 if len(masters) != 0 {
272 s.router.SwitchMasters(masters)
273 }
274 return nil
275}
276
277func (s *Proxy) GetSentinels() ([]string, map[int]string) {
278 s.mu.Lock()

Callers 1

rewatchSentinelsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected