updater is the component of the tunnel responsible for sending workspace updates to the manager.
| 325 | // updater is the component of the tunnel responsible for sending workspace |
| 326 | // updates to the manager. |
| 327 | type updater struct { |
| 328 | ctx context.Context |
| 329 | cancel context.CancelFunc |
| 330 | netLoopDone chan struct{} |
| 331 | |
| 332 | logger slog.Logger |
| 333 | |
| 334 | mu sync.Mutex |
| 335 | uSendCh chan<- *TunnelMessage |
| 336 | // agents contains the agents that are currently connected to the tunnel. |
| 337 | agents map[uuid.UUID]agentWithPing |
| 338 | // workspaces contains the workspaces to which agents are currently connected via the tunnel. |
| 339 | workspaces map[uuid.UUID]tailnet.Workspace |
| 340 | conn Conn |
| 341 | |
| 342 | clock quartz.Clock |
| 343 | } |
| 344 | |
| 345 | type agentWithPing struct { |
| 346 | tailnet.Agent |
no outgoing calls
no test coverage detected