Documentation ¶
Index ¶
- Constants
- func ColimaDiffDisk(profileID string) string
- func ColimaStateFile(profileID string) string
- func IPAddress(profileID string) string
- func InstanceConfig() (config.Config, error)
- func LimaHome() string
- func Limactl(args ...string) *exec.Cmd
- func NetworkFile() string
- func ShowSSH(profileID string) (resp struct{ ... }, err error)
- type InstanceInfo
Constants ¶
const EnvLimaHome = "LIMA_HOME"
EnvLimaHome is the environment variable for the Lima directory.
const LimactlCommand = "limactl"
LimactlCommand is the limactl command.
Variables ¶
This section is empty.
Functions ¶
func ColimaDiffDisk ¶ added in v0.5.3
ColimaDiffDisk returns path to the diffdisk for the colima VM.
func ColimaStateFile ¶ added in v0.4.5
ColimaStateFile returns path to the colima state yaml file.
func IPAddress ¶
IPAddress returns the ip address for profile. It returns the PTP address if networking is enabled or falls back to 127.0.0.1. It is guaranteed to return a value.
TODO: unnecessary round-trip is done to get instance details from Lima.
func InstanceConfig ¶
InstanceConfig returns the current instance config.
func LimaHome ¶ added in v0.4.5
func LimaHome() string
LimaHome returns the config directory for Lima.
func NetworkFile ¶ added in v0.6.2
func NetworkFile() string
NetworkFile returns path to the network file.
Types ¶
type InstanceInfo ¶
type InstanceInfo struct { Name string `json:"name,omitempty"` Status string `json:"status,omitempty"` Arch string `json:"arch,omitempty"` CPU int `json:"cpus,omitempty"` Memory int64 `json:"memory,omitempty"` Disk int64 `json:"disk,omitempty"` Dir string `json:"dir,omitempty"` Network []struct { VNL string `json:"vnl,omitempty"` Interface string `json:"interface,omitempty"` } `json:"network,omitempty"` IPAddress string `json:"address,omitempty"` Runtime string `json:"runtime,omitempty"` }
InstanceInfo is the information about a Lima instance
func Instances ¶
func Instances(ids ...string) ([]InstanceInfo, error)
Instances returns Lima instances created by colima.
func (InstanceInfo) Config ¶
func (i InstanceInfo) Config() (config.Config, error)
Config returns the current Colima config
func (InstanceInfo) Running ¶
func (i InstanceInfo) Running() bool
Running checks if the instance is running.