hyperkit

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: Apache-2.0 Imports: 11 Imported by: 10

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 GetIPAddressByMACAddress

func GetIPAddressByMACAddress(mac string) (string, error)

func GetMACAddressFromUUID

func GetMACAddressFromUUID(UUID string) (string, error)

func GetNetAddr

func GetNetAddr() (net.IP, error)

func RetryAfter

func RetryAfter(attempts int, callback func() error, d time.Duration) (err 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
	BootKernel     string
	BootInitrd     string
	Initrd         string
	Vmlinuz        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

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

type MultiError

type MultiError struct {
	Errors []error
}

func (*MultiError) Collect

func (m *MultiError) Collect(err error)

func (MultiError) ToError

func (m MultiError) ToError() error

type RetriableError

type RetriableError struct {
	Err error
}

func (RetriableError) Error

func (r RetriableError) Error() string

Jump to

Keyboard shortcuts

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