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

Function NewTunnelSrcCoordController

tailnet/controllers.go:405–418  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

403// NewTunnelSrcCoordController creates a CoordinationController for peers that are exclusively
404// tunnel sources (that is, they create tunnel --- Coder clients not workspaces).
405func 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
420func (c *TunnelSrcCoordController) New(client CoordinatorClient) CloserWaiter {
421 c.mu.Lock()

Calls

no outgoing calls