(proxy map[string]*models.Proxy)
| 123 | } |
| 124 | |
| 125 | func (s *Topom) refillCacheProxy(proxy map[string]*models.Proxy) (map[string]*models.Proxy, error) { |
| 126 | if proxy == nil { |
| 127 | return s.store.ListProxy() |
| 128 | } |
| 129 | for t, _ := range proxy { |
| 130 | if proxy[t] != nil { |
| 131 | continue |
| 132 | } |
| 133 | p, err := s.store.LoadProxy(t, false) |
| 134 | if err != nil { |
| 135 | return nil, err |
| 136 | } |
| 137 | if p != nil { |
| 138 | proxy[t] = p |
| 139 | } else { |
| 140 | delete(proxy, t) |
| 141 | } |
| 142 | } |
| 143 | return proxy, nil |
| 144 | } |
| 145 | |
| 146 | func (s *Topom) refillCacheSentinel(sentinel *models.Sentinel) (*models.Sentinel, error) { |
| 147 | if sentinel != nil { |
no test coverage detected