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 HostOS string HostArch string LimaHome string IdentityFile string }
func AddGlobalFields ¶
func AddGlobalFields(inst *limatype.Instance) (FormatData, error)
type PrintOptions ¶
Click to show internal directories.
Click to hide internal directories.