lima

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package lima handles generating Lima configuration files and managing VM lifecycle (create, start, stop, delete, status) on remote hosts.

Index

Constants

View Source
const NodePackages = "curl open-iscsi nfs-common socat"

NodePackages are the apt packages installed on every Lima node during provisioning. socat is required for `kubectl port-forward` (and devx bridge) to carry traffic on Docker-runtime k3s nodes — without it the forward binds locally but connections fail with "socat not found". Keeping this list in one place lets both initial provisioning (GenerateConfig) and `devx cluster reconcile` install the exact same set on existing nodes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager handles Lima VM operations on a remote host.

func NewManager

func NewManager(runner *remote.Runner, node config.NodeConfig) *Manager

NewManager creates a new Lima manager for the given host and node config.

func (*Manager) Destroy

func (m *Manager) Destroy(ctx context.Context) error

Destroy stops and deletes the Lima VM.

func (*Manager) GenerateConfig

func (m *Manager) GenerateConfig(socketPath string, dockerEnabled bool) string

GenerateConfig returns the Lima YAML config for this node.

func (*Manager) GetBridgedIP

func (m *Manager) GetBridgedIP(ctx context.Context) (string, error)

GetBridgedIP returns the bridged LAN IP address of the VM.

func (*Manager) Provision

func (m *Manager) Provision(ctx context.Context, dockerEnabled bool) error

Provision creates and starts the Lima VM on the remote host.

func (*Manager) Status

func (m *Manager) Status(ctx context.Context) (VMStatus, error)

Status returns the current VM status on the remote host.

type VMStatus

type VMStatus string

VMStatus represents the state of a Lima VM.

const (
	VMStatusRunning    VMStatus = "Running"
	VMStatusStopped    VMStatus = "Stopped"
	VMStatusNotCreated VMStatus = "NotCreated"
	VMStatusUnknown    VMStatus = "Unknown"
)

Jump to

Keyboard shortcuts

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