workstation

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Workstation

type Workstation struct {
	*runtime.Runtime

	// Workstation-specific dependencies (created as needed)
	NetworkManager   network.NetworkManager
	Services         []services.Service
	VirtualMachine   virt.VirtualMachine
	ContainerRuntime virt.ContainerRuntime
	SSHClient        ssh.Client
}

Workstation manages all workstation functionality including virtualization, networking, services, and SSH operations.

func NewWorkstation

func NewWorkstation(rt *runtime.Runtime, opts ...*Workstation) (*Workstation, error)

NewWorkstation creates a new Workstation instance with the provided runtime. Other dependencies are created only if not already present via opts.

func (*Workstation) Down

func (w *Workstation) Down() error

Down stops the workstation environment, including services, containers, VMs, and networking. It attempts to gracefully shut down the container runtime and virtual machine if they exist. On success, it prints a confirmation message to standard error and returns nil. If any teardown step fails, it returns an error describing the issue.

func (*Workstation) Prepare

func (w *Workstation) Prepare() error

Prepare creates all workstation components (network manager, services, virtual machine, container runtime) and assigns IP addresses to services. This must be called after configuration is loaded but before blueprint loading, as blueprint evaluation depends on service addresses being set in config. Returns an error if any component creation or IP assignment fails.

func (*Workstation) Up

func (w *Workstation) Up() error

Up initializes the workstation environment: starts VMs, containers, networking, and services. Sets NO_CACHE environment variable, starts the virtual machine if configured, writes service configs, starts the container runtime if enabled, and configures networking. All components must be created via Prepare() before calling Up(). Returns error on any failure.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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