Documentation ¶
Index ¶
- Constants
- Variables
- func CopyDir(sourceDir string, destinationDir string) error
- func Prlctl(ctx context.Context, args ...string) (string, string, error)
- func Prlsrvctl(ctx context.Context, args ...string) (string, string, error)
- type DHCPLease
- type DHCPSnooper
- type HardwareInfo
- type NetworkAdapterInfo
- type Option
- type Parallels
- type ServerInfo
- type VM
- type VirtualMachineInfo
Constants ¶
View Source
const DefaultDHCPLeasesFile = "/Library/Preferences/Parallels/parallels_dhcp_leases"
Variables ¶
View Source
var ( ErrParallelsCommandNotFound = errors.New("Parallels command not found") ErrParallelsCommandNonZero = errors.New("Parallels command returned non-zero exit code") )
View Source
var ErrDHCPSnoopFailed = errors.New("failed to retrieve VM's DHCP address")
View Source
var (
ErrFailed = errors.New("Parallels isolation failed")
)
View Source
var ErrVMFailed = errors.New("Parallels VM operation failed")
View Source
var ErrVMKiller = errors.New("failed to kill running VM processes")
Functions ¶
Types ¶
type DHCPSnooper ¶
type DHCPSnooper struct {
DHCPLeasesFile string
}
func (*DHCPSnooper) FindNewestLease ¶
func (snooper *DHCPSnooper) FindNewestLease(mac []byte) (*DHCPLease, error)
func (*DHCPSnooper) Leases ¶
func (snooper *DHCPSnooper) Leases() ([]*DHCPLease, error)
type HardwareInfo ¶
type HardwareInfo struct {
Net0 NetworkAdapterInfo
}
type NetworkAdapterInfo ¶
type NetworkAdapterInfo struct {
MAC string
}
type Option ¶ added in v0.35.0
type Option func(parallels *Parallels)
func WithLogger ¶ added in v0.35.0
func WithLogger(logger logger.Lightweight) Option
type Parallels ¶
type Parallels struct {
// contains filtered or unexported fields
}
func (*Parallels) Attributes ¶ added in v0.114.2
type ServerInfo ¶
type ServerInfo struct {
VMHome string `json:"VM home"`
}
func GetServerInfo ¶
func GetServerInfo(ctx context.Context) (*ServerInfo, error)
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
func (*VM) ClonedFromSuspended ¶ added in v0.35.0
type VirtualMachineInfo ¶
type VirtualMachineInfo struct { ID string Name string State string Home string Hardware HardwareInfo }
Click to show internal directories.
Click to hide internal directories.