attach

package
v0.2.63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MPL-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func NewController(ctx context.Context, pu *processor.Unit, svc *attached.Service) *Controller

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

func (c *Controller) Start()

Start binds the listeners and serves.

func (*Controller) Stop

func (c *Controller) Stop()

Stop closes the listeners and every link. A machine told `shutdown` dials again, to whichever node answers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL