NewTunnelSrcCoordController creates a CoordinationController for peers that are exclusively tunnel sources (that is, they create tunnel --- Coder clients not workspaces).
( logger slog.Logger, coordinatee Coordinatee, )
| 403 | // NewTunnelSrcCoordController creates a CoordinationController for peers that are exclusively |
| 404 | // tunnel sources (that is, they create tunnel --- Coder clients not workspaces). |
| 405 | func NewTunnelSrcCoordController( |
| 406 | logger slog.Logger, coordinatee Coordinatee, |
| 407 | ) *TunnelSrcCoordController { |
| 408 | return &TunnelSrcCoordController{ |
| 409 | BasicCoordinationController: &BasicCoordinationController{ |
| 410 | Logger: logger, |
| 411 | Coordinatee: coordinatee, |
| 412 | SendAcks: false, |
| 413 | Initiator: codersdk.DisconnectInitiatorClient, |
| 414 | Direction: codersdk.ConnectionDirectionClientToServer, |
| 415 | }, |
| 416 | dests: make(map[uuid.UUID]struct{}), |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | func (c *TunnelSrcCoordController) New(client CoordinatorClient) CloserWaiter { |
| 421 | c.mu.Lock() |
no outgoing calls