initSocketServer initializes server that allows direct communication with a workspace agent using IPC.
()
| 452 | |
| 453 | // initSocketServer initializes server that allows direct communication with a workspace agent using IPC. |
| 454 | func (a *agent) initSocketServer() { |
| 455 | if !a.socketServerEnabled { |
| 456 | a.logger.Info(a.hardCtx, "socket server is disabled") |
| 457 | return |
| 458 | } |
| 459 | |
| 460 | server, err := agentsocket.NewServer( |
| 461 | a.logger.Named("socket"), |
| 462 | agentsocket.WithPath(a.socketPath), |
| 463 | ) |
| 464 | if err != nil { |
| 465 | a.logger.Error(a.hardCtx, "failed to create socket server", slog.Error(err), slog.F("path", a.socketPath)) |
| 466 | return |
| 467 | } |
| 468 | |
| 469 | a.socketServer = server |
| 470 | a.logger.Debug(a.hardCtx, "socket server started", slog.F("path", a.socketPath)) |
| 471 | } |
| 472 | |
| 473 | // startBoundaryLogProxyServer starts the boundary log proxy socket server. |
| 474 | func (a *agent) startBoundaryLogProxyServer() { |