Documentation
¶
Overview ¶
Package mesh puts this worker on its project's Mainplane Network: tailscale's engine (wireguard-go, magicsock, the DERP client) on a TUN of its own, with its own state, UDP port, and router, so it runs beside a user's own Tailscale. The coordinator and relay are the harness's, reached over WebSocket at its front door URL, which the harness key proves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoWorker = errors.New("this machine is not a worker")
ErrNoWorker is a socket no worker answers: none runs on this machine.
Functions ¶
func Clean ¶
func Clean() error
Clean removes what a killed worker left: the hosts block, and on Linux and Windows the rule. Uninstall runs it after the worker stops.
Types ¶
type Mesh ¶
type Mesh struct {
// contains filtered or unexported fields
}
Mesh is this worker's node.
func Up ¶
Up brings the node up with its state in dir: the TUN, then the engine. It registers as name with the join secret on first start; the keys in dir register again with none. It follows the harness with key harness through the pointer and moves its control client when the harness moves.
func (*Mesh) Close ¶
Close leaves the mesh: the status socket, the hosts block go, the router takes its address, route and rule away, and the TUN goes.
func (*Mesh) Peer ¶
Peer is the address of the peer named name in the last map, which stays while the coordinator is out of reach.