colima

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package colima wraps the `colima` CLI, which has no API. It exposes the VM status (resources, runtime, docker socket) and lifecycle controls.

Index

Constants

View Source
const Profile = "default"

Profile is the colima profile this GUI manages. v1 targets the default.

Variables

This section is empty.

Functions

func DockerSocketPath

func DockerSocketPath(ctx context.Context) (string, error)

DockerSocketPath returns the filesystem path of the docker socket (without the unix:// scheme), or an error if the VM is not running.

func Installed

func Installed() bool

Installed reports whether the colima CLI is on PATH. When it isn't, the GUI drives a generic Docker engine instead of managing a colima VM.

func Stream

func Stream(ctx context.Context, action string) (<-chan string, <-chan error, error)

Stream runs a lifecycle action (start|stop|restart) and streams its output. colima logs progress to stderr, which execstream merges in.

Types

type Status

type Status struct {
	Engine       string `json:"engine"` // "colima" | "docker"
	Running      bool   `json:"running"`
	Profile      string `json:"profile"`
	Runtime      string `json:"runtime"`
	Arch         string `json:"arch"`
	CPU          int    `json:"cpu"`
	Memory       int64  `json:"memory"`
	Disk         int64  `json:"disk"`
	Kubernetes   bool   `json:"kubernetes"`
	DockerSocket string `json:"dockerSocket"`
	MountType    string `json:"mountType"`
	Driver       string `json:"driver"`
	Version      string `json:"version,omitempty"`
}

Status is the merged view from `colima list --json` (always available) and `colima status --json` (only when the VM is running, adds the socket).

func GetStatus

func GetStatus(ctx context.Context) (Status, error)

GetStatus returns the current status of the managed profile. A stopped VM is a normal result (Running=false), not an error.

Jump to

Keyboard shortcuts

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