supervisor

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package supervisor orders the high-level MachineProxy startup sequence. It receives small runtime dependency interfaces from cmd/machineproxy, and feeds them in dependency order: backend, namespace, workspace FUSE, optional path stubs, broker, and child launcher.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendStarter added in v1.2.0

type BackendStarter interface {
	StartBackend(ctx context.Context) error
}

BackendStarter opens the remote connection (SSH dial, Docker attach, …). Kept as an interface so runtime wiring stays in main.

type Broker

type Broker interface {
	StartBroker(ctx context.Context) error
}

type Deps

type Deps struct {
	Backend   BackendStarter
	NS        Namespace
	FS        WorkspaceFS
	PathStubs PathStubs // optional
	Broker    Broker
	Launcher  Launcher
	Log       *slog.Logger
}

type Launcher

type Launcher interface {
	RunChild(ctx context.Context, cmd []string) error
}

type Namespace

type Namespace interface {
	EnterNamespace(ctx context.Context) error
}

type PathStubs added in v1.1.0

type PathStubs interface {
	BuildPathStubs(ctx context.Context) error
}

PathStubs is optional. When provided it runs between the workspace FUSE mount and the broker start, building the read-only stub directory that fronts remote-PATH executables.

type Supervisor

type Supervisor struct {
	// contains filtered or unexported fields
}

func New

func New(deps Deps) *Supervisor

func (*Supervisor) Run

func (s *Supervisor) Run(ctx context.Context, cmd []string) error

type WorkspaceFS

type WorkspaceFS interface {
	MountWorkspace(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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