Documentation ¶
Index ¶
- Constants
- Variables
- func Installed() error
- type Config
- type Image
- type Instance
- type Manager
- func (m *Manager) CreateInstance(name string) error
- func (m *Manager) DeleteInstance(name string) error
- func (m *Manager) GetInstance(name string) (Instance, bool)
- func (m *Manager) InventoryPath() string
- func (m *Manager) OpenShell(name string, dir string, commandArgs []string) error
- func (m *Manager) StartInstance(name string) error
- func (m *Manager) StopInstance(name string) error
- type PortForward
Constants ¶
View Source
const (
RequiredMacOSVersion = "13.0.0"
)
View Source
const (
VersionRequired = ">= 0.15.0"
)
Variables ¶
View Source
var ( ConfigErr = errors.New("Could not write Lima config file") IpErr = errors.New("Could not determine IP address for VM instance") )
View Source
var ( ConfigPathError = errors.New("could not create config directory") UnsupportedOSError = errors.New("Unsupported OS or macOS version. The macOS Virtualization Framework requires macOS 13.0 (Ventura) or later.") )
View Source
var ConfigTemplate string
View Source
var UbuntuImages = map[string][]Image{
"18.04": {
{
Alias: "bionic",
Location: "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img",
Arch: "x86_64",
},
{
Alias: "bionic",
Location: "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-arm64.img",
Arch: "aarch64",
},
},
"20.04": {
{
Alias: "focal",
Location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img",
Arch: "x86_64",
},
{
Alias: "focal",
Location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-arm64.img",
Arch: "aarch64",
},
},
"22.04": {
{
Alias: "jammy",
Location: "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img",
Arch: "x86_64",
},
{
Alias: "jammy",
Location: "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-arm64.img",
Arch: "aarch64",
},
},
}
Functions ¶
Types ¶
type Config ¶
type Config struct { Images []Image `yaml:"images"` PortForwards []PortForward `yaml:"portForwards"` }
type Instance ¶
type Instance struct { ConfigFile string InventoryFile string Sites map[string]*trellis.Site Name string `json:"name"` Status string `json:"status"` Dir string `json:"dir"` Arch string `json:"arch"` Cpus int `json:"cpus"` Memory int `json:"memory"` Disk int `json:"disk"` SshLocalPort int `json:"sshLocalPort,omitempty"` Config Config `json:"config"` Username string `json:"username,omitempty"` }
func (*Instance) CreateConfig ¶
func (*Instance) CreateInventoryFile ¶
func (*Instance) DeleteConfig ¶ added in v1.11.0
type Manager ¶
type Manager struct { ConfigPath string Sites map[string]*trellis.Site HostsResolver vm.HostsResolver // contains filtered or unexported fields }
func NewManager ¶
func (*Manager) CreateInstance ¶
func (*Manager) DeleteInstance ¶
func (*Manager) InventoryPath ¶
func (*Manager) StartInstance ¶
func (*Manager) StopInstance ¶
type PortForward ¶
Click to show internal directories.
Click to hide internal directories.