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

Function NewTunnelAllWorkspaceUpdatesController

tailnet/controllers.go:1473–1485  ·  view source on GitHub ↗

NewTunnelAllWorkspaceUpdatesController creates a WorkspaceUpdatesController that creates tunnels (via the TunnelSrcCoordController) to all agents received over the WorkspaceUpdates RPC. If a DNSHostSetter is provided, it also programs DNS hosts based on the agent and workspace names.

(
	logger slog.Logger, c *TunnelSrcCoordController, opts ...TunnelAllOption,
)

Source from the content-addressed store, hash-verified

1471// (via the TunnelSrcCoordController) to all agents received over the WorkspaceUpdates RPC. If a
1472// DNSHostSetter is provided, it also programs DNS hosts based on the agent and workspace names.
1473func NewTunnelAllWorkspaceUpdatesController(
1474 logger slog.Logger, c *TunnelSrcCoordController, opts ...TunnelAllOption,
1475) *TunnelAllWorkspaceUpdatesController {
1476 t := &TunnelAllWorkspaceUpdatesController{
1477 logger: logger,
1478 coordCtrl: c,
1479 dnsNameOptions: DNSNameOptions{CoderDNSSuffix},
1480 }
1481 for _, opt := range opts {
1482 opt(t)
1483 }
1484 return t
1485}
1486
1487// NewController creates a new Controller without running it
1488func NewController(logger slog.Logger, dialer ControlProtocolDialer, opts ...ControllerOpt) *Controller {

Calls

no outgoing calls