MCPcopy Index your code
hub / github.com/CodisLabs/codis / SetSentinels

Method SetSentinels

pkg/proxy/proxy.go:286–297  ·  view source on GitHub ↗
(servers []string)

Source from the content-addressed store, hash-verified

284}
285
286func (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
299func (s *Proxy) RewatchSentinels() error {
300 s.mu.Lock()

Callers 2

reinitProxyMethod · 0.45
ResyncSentinelsMethod · 0.45

Calls 2

rewatchSentinelsMethod · 0.95
WarnfMethod · 0.80

Tested by

no test coverage detected