(id int)
| 73 | } |
| 74 | |
| 75 | func (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 | |
| 85 | func (s *Router) HasSwitched() bool { |
| 86 | s.mu.RLock() |
no test coverage detected