hyperkit

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Kind is the canonical name of the plugin for starting up, etc.
	Kind = "hyperkit"

	// EnvDir is the environment variable for where the instance states are stored.
	EnvDir = "INFRAKIT_INSTANCE_HYPERKIT_DIR"

	// EnvDiscoveryHostPort is the environment variable to set to use for discovery of this plugin
	// by other infrakit components.  If infrakit is running in a container on Docker4Mac, use
	// 192.168.65.1.248645 (the default).  If infrakit is running as a process on a Mac, use
	// 127.0.0.1:24865 (loop back at the port this plugin is listening on).
	EnvDiscoveryHostPort = "INFRAKIT_INSTANCE_HYPERKIT_DISCOVERY_HOSTPORT"
)

Variables

View Source
var DefaultOptions = Options{
	Listen:            ":24865",
	DiscoveryHostPort: local.Getenv(EnvDiscoveryHostPort, "192.168.65.1:24865"),
	Dir:               local.Getenv(EnvDir, filepath.Join(local.InfrakitHome(), "hyperkit-vms")),
	VpnKitSock:        "auto",
	HyperKitCmd:       "hyperkit",
}

DefaultOptions return an Options with default values filled in.

Functions

func Run

func Run(plugins func() discovery.Plugins, name plugin.Name,
	config *types.Any) (transport plugin.Transport, impls map[run.PluginCode]interface{}, onStop func(), err error)

Run runs the plugin, blocking the current thread. Error is returned immediately if the plugin cannot be started.

Types

type Options

type Options struct {
	// Dir is the directory for storing the VM state
	Dir string

	// HyperKitCmd is the hyperkit command to use
	HyperKitCmd string

	// VpnKitSock is the path to VpnKit unix domain socket
	VpnKitSock string

	// Listen is the port spec to listen on.
	Listen string

	// DiscoveryHostPort is the host:port used for other infrakit components to discover and connect to this plugin.
	// Use 192.168.65.1:24864 if running on Docker4Mac and if infrakit is running in a container.
	DiscoveryHostPort string
}

Options capture the options for starting up the plugin.

Jump to

Keyboard shortcuts

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