()
| 1802 | } |
| 1803 | |
| 1804 | func (h *heartbeats) sendBeats() { |
| 1805 | defer h.wg.Done() |
| 1806 | // send an initial heartbeat so that other coordinators can start using our bindings right away. |
| 1807 | h.sendBeat() |
| 1808 | close(h.firstHeartbeat) // signal binder it can start writing |
| 1809 | tkr := h.clock.TickerFunc(h.ctx, HeartbeatPeriod, func() error { |
| 1810 | h.sendBeat() |
| 1811 | return nil |
| 1812 | }, "heartbeats", "sendBeats") |
| 1813 | err := tkr.Wait() |
| 1814 | h.logger.Debug(h.ctx, "ending heartbeats", slog.Error(err)) |
| 1815 | } |
| 1816 | |
| 1817 | func (h *heartbeats) sendBeat() { |
| 1818 | _, err := h.store.UpsertTailnetCoordinator(h.ctx, h.self) |
no test coverage detected