Documentation
¶
Index ¶
- Variables
- func Directory() string
- func DiskDir(name string) (string, error)
- func Disks() ([]string, error)
- func Inspect(ctx context.Context, instName string) (*limatype.Instance, error)
- func Instances() ([]string, error)
- func LoadYAMLByFilePath(ctx context.Context, filePath string) (*limatype.LimaYAML, error)
- func PrintInstances(w io.Writer, instances []*limatype.Instance, format string, ...) error
- func ReadPIDFile(path string) (int, error)
- func Validate() error
- type Disk
- type FormatData
- type PrintOptions
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 Inspect ¶
Inspect returns err only when the instance does not exist (os.ErrNotExist). Other errors are returned as *Instance.Errors.
func LoadYAMLByFilePath ¶
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 ¶
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).
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 ¶
type FormatData ¶
type FormatData struct {
limatype.Instance `yaml:",inline"`
// Using these host attributes is deprecated; they will be removed in Lima 3.0
// The values are available from `limactl info` as hostOS, hostArch, limaHome, and identifyFile.
HostOS string `json:"HostOS" yaml:"HostOS" lima:"deprecated"`
HostArch string `json:"HostArch" yaml:"HostArch" lima:"deprecated"`
LimaHome string `json:"LimaHome" yaml:"LimaHome" lima:"deprecated"`
IdentityFile string `json:"IdentityFile" yaml:"IdentityFile" lima:"deprecated"`
}
func AddGlobalFields ¶
func AddGlobalFields(inst *limatype.Instance) (FormatData, error)
type PrintOptions ¶
Click to show internal directories.
Click to hide internal directories.