MCPcopy Create free account
hub / github.com/coder/coder / handleUpdates

Method handleUpdates

enterprise/tailnet/pgcoord.go:1375–1395  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1373}
1374
1375func (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
1397func (q *querier) updateAll() {
1398 q.mu.Lock()

Callers 1

newQuerierFunction · 0.95

Calls 4

updateAllMethod · 0.95
unhealthyCloseAllMethod · 0.95
setHealthyMethod · 0.95
DoneMethod · 0.45

Tested by

no test coverage detected