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

Method updateAll

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

Source from the content-addressed store, hash-verified

1395}
1396
1397func (q *querier) updateAll() {
1398 q.mu.Lock()
1399 defer q.mu.Unlock()
1400
1401 for _, mpr := range q.mappers {
1402 // send on goroutine to avoid holding the q.mu. Heartbeat failures come asynchronously with respect to
1403 // other kinds of work, so it's fine to deliver the command to refresh async.
1404 go func(m *mapper) {
1405 // make sure we send on the _mapper_ context, not our own in case the mapper is
1406 // shutting down or shut down.
1407 _ = agpl.SendCtx(m.ctx, m.update, struct{}{})
1408 }(mpr)
1409 }
1410}
1411
1412// unhealthyCloseAll marks the coordinator unhealthy and closes all connections. We do this so that peers
1413// are forced to reconnect to the coordinator, and will hopefully land on a healthy coordinator.

Callers 1

handleUpdatesMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected