Documentation
¶
Overview ¶
Package attachlink is the machine's side of `txco attach`: a personality with no listener. It dials each chassis this machine is attached to, proves its key, and hands every request that comes down the link to the chassis's own `_attach` stack, as an inlet does (chassis/attached).
It runs nothing itself. A request is an envelope into the bus; the stack decides what happens, and `_attach`'s built-in rule runs the command through the owner workspace provider. What goes back up the link is only the envelope's `attach` object, or its `workspace.error`.
It also reports the end of detached jobs. A job started for an async op carries that op's continuation; when the job's exit is on disk the result goes up the link, on this connection or a later one, until the chassis acknowledges it.
OFF unless `attachlink` is in --personalities and --attach-home is set. `txco attach` sets both; a full chassis may too.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// Say, when set, prints one line for the owner (the terminal `txco
// attach` runs in). The log gets every line regardless.
Say func(string)
// Idle, when set, is called once the last credential this process was
// serving has been ended by its chassis: there is nothing left to do.
Idle func()
// contains filtered or unexported fields
}
Controller runs one link per credential in the attach folder.
func NewController ¶
func NewController(ctx context.Context, pu *processor.Unit) *Controller
NewController constructs (but does not start) the personality.
func (*Controller) Start ¶
func (c *Controller) Start()
Start dials every live credential and begins watching for ended jobs.
func (*Controller) Stop ¶
func (c *Controller) Stop()
Stop ends every link. Detached jobs are not this process's to end: they run on, and their ends are reported after the next start.