store

package
v2.0.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FormatHelp = "\n" +
	"These functions are available to go templates:\n\n" +
	textutil.IndentString(2,
		strings.Join(textutil.FuncHelp, "\n")+"\n")

Functions

func Directory

func Directory() string

Directory returns the LimaDir.

func DiskDir

func DiskDir(name string) (string, error)

func Disks

func Disks() ([]string, error)

func Inspect

func Inspect(ctx context.Context, instName string) (*limatype.Instance, error)

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

func Instances

func Instances() ([]string, error)

Instances returns the names of the instances under LimaDir.

func LoadYAMLByFilePath

func LoadYAMLByFilePath(ctx context.Context, filePath string) (*limatype.LimaYAML, error)

LoadYAMLByFilePath loads and validates the yaml.

func PrintInstances

func PrintInstances(w io.Writer, instances []*limatype.Instance, format string, options *PrintOptions) error

PrintInstances prints instances in a requested format to a given io.Writer. Supported formats are "json", "yaml", "table", or a go template.

func ReadPIDFile

func ReadPIDFile(path string) (int, error)

ReadPIDFile returns 0 if the PID file does not exist or the process has already terminated (in which case the PID file will be removed).

func Validate

func Validate() error

Validate checks the LimaDir.

Types

type Disk

type Disk struct {
	Name        string `json:"name"`
	Size        int64  `json:"size"`
	Format      string `json:"format"`
	Dir         string `json:"dir"`
	Instance    string `json:"instance"`
	InstanceDir string `json:"instanceDir"`
	MountPoint  string `json:"mountPoint"`
}

func InspectDisk

func InspectDisk(diskName string) (*Disk, error)

func (*Disk) Lock

func (d *Disk) Lock(instanceDir string) error

func (*Disk) Unlock

func (d *Disk) Unlock() error

type FormatData

type FormatData struct {
	limatype.Instance
	HostOS       string
	HostArch     string
	LimaHome     string
	IdentityFile string
}

func AddGlobalFields

func AddGlobalFields(inst *limatype.Instance) (FormatData, error)

type PrintOptions

type PrintOptions struct {
	AllFields     bool
	TerminalWidth int
}

Jump to

Keyboard shortcuts

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