startBoundaryLogProxyServer starts the boundary log proxy socket server.
()
| 472 | |
| 473 | // startBoundaryLogProxyServer starts the boundary log proxy socket server. |
| 474 | func (a *agent) startBoundaryLogProxyServer() { |
| 475 | if a.boundaryLogProxySocketPath == "" { |
| 476 | a.logger.Warn(a.hardCtx, "boundary log proxy socket path not defined; not starting proxy") |
| 477 | return |
| 478 | } |
| 479 | |
| 480 | proxy := boundarylogproxy.NewServer(a.logger, a.boundaryLogProxySocketPath, a.prometheusRegistry) |
| 481 | if err := proxy.Start(); err != nil { |
| 482 | a.logger.Warn(a.hardCtx, "failed to start boundary log proxy", slog.Error(err)) |
| 483 | return |
| 484 | } |
| 485 | |
| 486 | a.boundaryLogProxy = proxy |
| 487 | a.logger.Info(a.hardCtx, "boundary log proxy server started", |
| 488 | slog.F("socket_path", a.boundaryLogProxySocketPath)) |
| 489 | } |
| 490 | |
| 491 | // runLoop attempts to start the agent in a retry loop. |
| 492 | // Coder may be offline temporarily, a connection issue |