store

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DotLima = ".lima"

DotLima is a directory that appears under the home directory.

Variables

This section is empty.

Functions

func InstanceDir

func InstanceDir(name string) (string, error)

InstanceDir returns the instance dir. InstanceDir does not check whether the instance exists

func Instances

func Instances() ([]string, error)

Instances returns the names of the instances under LimaDir.

func LimaConfigDir added in v0.5.0

func LimaConfigDir() (string, error)

LimaConfigDir returns the path of the config directory, $LIMA_HOME/_config.

func LimaDir

func LimaDir() (string, error)

LimaDir returns the abstract path of `~/.lima` (or $LIMA_HOME, if set).

NOTE: We do not use `~/Library/Application Support/Lima` on macOS. We use `~/.lima` so that we can have enough space for the length of the socket path, which can be only 104 characters on macOS.

func LoadYAMLByFilePath

func LoadYAMLByFilePath(filePath string) (*limayaml.LimaYAML, error)

LoadYAMLByFilePath loads and validates the yaml.

Types

type Instance added in v0.3.0

type Instance struct {
	Name         string        `json:"name"`
	Status       Status        `json:"status"`
	Dir          string        `json:"dir"`
	Arch         limayaml.Arch `json:"arch"`
	SSHLocalPort int           `json:"sshLocalPort,omitempty"`
	HostAgentPID int           `json:"hostAgentPID,omitempty"`
	QemuPID      int           `json:"qemuPID,omitempty"`
	Errors       []error       `json:"errors,omitempty"`
}

func Inspect added in v0.3.0

func Inspect(instName string) (*Instance, error)

Inspect returns err only when the instance does not exist (os.ErrNotExist). Other errors are returned as *Instance.Errors

func (*Instance) LoadYAML added in v0.3.0

func (inst *Instance) LoadYAML() (*limayaml.LimaYAML, error)

type Status added in v0.3.0

type Status = string
const (
	StatusUnknown Status = ""
	StatusBroken  Status = "Broken"
	StatusStopped Status = "Stopped"
	StatusRunning Status = "Running"
)

Directories

Path Synopsis
Package filenames defines the names of the files that appear under an instance dir or inside the config directory.
Package filenames defines the names of the files that appear under an instance dir or inside the config directory.

Jump to

Keyboard shortcuts

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