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, )
| 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. |
| 1473 | func 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 |
| 1488 | func NewController(logger slog.Logger, dialer ControlProtocolDialer, opts ...ControllerOpt) *Controller { |
no outgoing calls