(slots []*models.SlotMapping)
| 81 | } |
| 82 | |
| 83 | func (s *Topom) refillCacheSlots(slots []*models.SlotMapping) ([]*models.SlotMapping, error) { |
| 84 | if slots == nil { |
| 85 | return s.store.SlotMappings() |
| 86 | } |
| 87 | for i, _ := range slots { |
| 88 | if slots[i] != nil { |
| 89 | continue |
| 90 | } |
| 91 | m, err := s.store.LoadSlotMapping(i, false) |
| 92 | if err != nil { |
| 93 | return nil, err |
| 94 | } |
| 95 | if m != nil { |
| 96 | slots[i] = m |
| 97 | } else { |
| 98 | slots[i] = &models.SlotMapping{Id: i} |
| 99 | } |
| 100 | } |
| 101 | return slots, nil |
| 102 | } |
| 103 | |
| 104 | func (s *Topom) refillCacheGroup(group map[int]*models.Group) (map[int]*models.Group, error) { |
| 105 | if group == nil { |
no test coverage detected