Documentation
¶
Overview ¶
Package attach is the chassis head a machine dials with `txco attach` (chassis/attached): three public HTTP routes on a listener of its own.
POST /v1/attach/code what a one-use code is for, without spending it POST /v1/attach/enroll spend the code and enroll the key that signed GET /v1/attach the link, a WebSocket carrying yamux streams
OFF by default. Both gates must be flipped:
- `attach` must appear in `--personalities`
- `--attach-listen-addrs` must be non-empty
The routes authenticate their own callers (a code, then a key); the listener is meant to be reached from the internet, behind the same edge as every other host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller owns the attach listeners.
func NewController ¶
NewController constructs (but does not start) the head. svc is nil on a chassis that serves no attached workspaces; the head then stays off.
func (*Controller) Addrs ¶
func (c *Controller) Addrs() []string
Addrs returns the addresses the listeners are bound to (":0" resolved).
func (*Controller) Stop ¶
func (c *Controller) Stop()
Stop closes the listeners and every link. A machine told `shutdown` dials again, to whichever node answers.