hyperkit

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DHCPLeasesFile = "/var/db/dhcpd_leases"
	CONFIG_PLIST   = "/Library/Preferences/SystemConfiguration/com.apple.vmnet"
	NET_ADDR_KEY   = "Shared_Net_Address"
)

Variables

This section is empty.

Functions

func ExtractFile

func ExtractFile(isoPath, srcPath, destPath string) error

func GetIPAddressByMACAddress

func GetIPAddressByMACAddress(mac string) (string, error)

func GetMACAddressFromUUID added in v0.23.0

func GetMACAddressFromUUID(UUID string) (string, error)

func GetNetAddr added in v0.25.0

func GetNetAddr() (net.IP, error)

func ReadFile

func ReadFile(isoPath, srcPath string) (string, error)

Types

type DHCPEntry

type DHCPEntry struct {
	Name      string
	IPAddress string
	HWAddress string
	ID        string
	Lease     string
}

type Driver

type Driver struct {
	*drivers.BaseDriver
	*pkgdrivers.CommonDriver
	Boot2DockerURL string
	DiskSize       int
	CPU            int
	Memory         int
	Cmdline        string
	NFSShares      []string
	NFSSharesRoot  string
	UUID           string
}

func NewDriver

func NewDriver(hostName, storePath string) *Driver

func (*Driver) Create

func (d *Driver) Create() error

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName returns the name of the driver

func (*Driver) GetSSHHostname

func (d *Driver) GetSSHHostname() (string, error)

GetSSHHostname returns hostname for use with ssh

func (*Driver) GetState

func (d *Driver) GetState() (state.State, error)

GetState returns the state that the host is in (running, stopped, etc)

func (*Driver) GetURL

func (d *Driver) GetURL() (string, error)

GetURL returns a Docker compatible host URL for connecting to this host e.g. tcp://1.2.3.4:2376

func (*Driver) Kill

func (d *Driver) Kill() error

Kill stops a host forcefully

func (*Driver) PreCreateCheck added in v0.24.0

func (d *Driver) PreCreateCheck() error

PreCreateCheck is called to enforce pre-creation steps

func (*Driver) Remove

func (d *Driver) Remove() error

Remove a host

func (*Driver) Restart

func (d *Driver) Restart() error

func (*Driver) Start

func (d *Driver) Start() error

Start a host

func (*Driver) Stop

func (d *Driver) Stop() error

Stop a host gracefully

Jump to

Keyboard shortcuts

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