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

Method FillSlot

pkg/proxy/router.go:102–122  ·  view source on GitHub ↗
(m *models.Slot)

Source from the content-addressed store, hash-verified

100)
101
102func (s *Router) FillSlot(m *models.Slot) error {
103 s.mu.Lock()
104 defer s.mu.Unlock()
105 if s.closed {
106 return ErrClosedRouter
107 }
108 if m.Id < 0 || m.Id >= MaxSlotNum {
109 return ErrInvalidSlotId
110 }
111 var method forwardMethod
112 switch m.ForwardMethod {
113 default:
114 return ErrInvalidMethod
115 case models.ForwardSync:
116 method = &forwardSync{}
117 case models.ForwardSemiAsync:
118 method = &forwardSemiAsync{}
119 }
120 s.fillSlot(m, false, method)
121 return nil
122}
123
124func (s *Router) KeepAlive() error {
125 s.mu.RLock()

Callers

nothing calls this directly

Calls 1

fillSlotMethod · 0.95

Tested by

no test coverage detected