MCPcopy Index your code
hub / github.com/coder/coder / initSocketServer

Method initSocketServer

agent/agent.go:454–471  ·  view source on GitHub ↗

initSocketServer initializes server that allows direct communication with a workspace agent using IPC.

()

Source from the content-addressed store, hash-verified

452
453// initSocketServer initializes server that allows direct communication with a workspace agent using IPC.
454func (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.
474func (a *agent) startBoundaryLogProxyServer() {

Callers 1

initMethod · 0.95

Calls 5

NewServerFunction · 0.92
WithPathFunction · 0.92
NamedMethod · 0.80
InfoMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected