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

Method GetSlot

pkg/proxy/router.go:75–83  ·  view source on GitHub ↗
(id int)

Source from the content-addressed store, hash-verified

73}
74
75func (s *Router) GetSlot(id int) *models.Slot {
76 s.mu.RLock()
77 defer s.mu.RUnlock()
78 if id < 0 || id >= MaxSlotNum {
79 return nil
80 }
81 slot := &s.slots[id]
82 return slot.snapshot()
83}
84
85func (s *Router) HasSwitched() bool {
86 s.mu.RLock()

Callers 1

Calls 1

snapshotMethod · 0.80

Tested by

no test coverage detected