()
| 1373 | } |
| 1374 | |
| 1375 | func (q *querier) handleUpdates() { |
| 1376 | defer q.wg.Done() |
| 1377 | for { |
| 1378 | select { |
| 1379 | case <-q.ctx.Done(): |
| 1380 | return |
| 1381 | case u := <-q.updates: |
| 1382 | if u.filter == filterUpdateUpdated { |
| 1383 | q.updateAll() |
| 1384 | } |
| 1385 | if u.health == healthUpdateUnhealthy { |
| 1386 | q.unhealthyCloseAll() |
| 1387 | continue |
| 1388 | } |
| 1389 | if u.health == healthUpdateHealthy { |
| 1390 | q.setHealthy() |
| 1391 | continue |
| 1392 | } |
| 1393 | } |
| 1394 | } |
| 1395 | } |
| 1396 | |
| 1397 | func (q *querier) updateAll() { |
| 1398 | q.mu.Lock() |
no test coverage detected