Documentation
¶
Index ¶
- func ReleasePortMaps(vmId string, containerip string, maps []pod.UserContainerPort) error
- func SetupPortMaps(vmId string, containerip string, maps []pod.UserContainerPort) error
- type VBoxContext
- func (vc *VBoxContext) AddDir(name, path string, readonly bool) error
- func (vc *VBoxContext) AddDisk(ctx *hypervisor.VmContext, sourceType string, ...)
- func (vc *VBoxContext) AddMem(ctx *hypervisor.VmContext, slot, size int, result chan<- error)
- func (vc *VBoxContext) AddNic(ctx *hypervisor.VmContext, host *hypervisor.HostNicInfo, ...)
- func (vc *VBoxContext) AllocateNetwork(vmId, requestedIP string, maps []pod.UserContainerPort) (*network.Settings, error)
- func (vc *VBoxContext) Associate(ctx *hypervisor.VmContext)
- func (vc *VBoxContext) Close()
- func (vc *VBoxContext) ConfigureNetwork(vmId, requestedIP string, maps []pod.UserContainerPort, ...) (*network.Settings, error)
- func (vc *VBoxContext) CreateVm(name, baseDir, hyperSockFile, ttySockFile string) error
- func (vc *VBoxContext) Dump() (map[string]interface{}, error)
- func (vc *VBoxContext) InitVM(ctx *hypervisor.VmContext) error
- func (vc *VBoxContext) Kill(ctx *hypervisor.VmContext)
- func (vc *VBoxContext) Launch(ctx *hypervisor.VmContext)
- func (vc *VBoxContext) LazyAddDisk(ctx *hypervisor.VmContext, name, sourceType, filename, format string, id int)
- func (vc *VBoxContext) LazyAddNic(ctx *hypervisor.VmContext, host *hypervisor.HostNicInfo, ...)
- func (vc *VBoxContext) LazyLaunch(ctx *hypervisor.VmContext)
- func (vc *VBoxContext) Pause(ctx *hypervisor.VmContext, pause bool, result chan<- error)
- func (vc *VBoxContext) ReleaseNetwork(vmId, releasedIP string, maps []pod.UserContainerPort, file *os.File) error
- func (vc *VBoxContext) RemoveDir(name string) error
- func (vc *VBoxContext) RemoveDisk(ctx *hypervisor.VmContext, blockInfo *hypervisor.BlockDescriptor, ...)
- func (vc *VBoxContext) RemoveNic(ctx *hypervisor.VmContext, n *hypervisor.InterfaceCreated, ...)
- func (vc *VBoxContext) Save(ctx *hypervisor.VmContext, path string, result chan<- error)
- func (vc *VBoxContext) SetCpus(ctx *hypervisor.VmContext, cpus int, result chan<- error)
- func (vc *VBoxContext) Shutdown(ctx *hypervisor.VmContext)
- func (vc *VBoxContext) Stats(ctx *hypervisor.VmContext) (*types.PodStats, error)
- type VBoxDriver
- func (vd *VBoxDriver) BuildinNetwork() bool
- func (vd *VBoxDriver) InitContext(homeDir string) hypervisor.DriverContext
- func (vd *VBoxDriver) InitNetwork(bIface, bIP string, disableIptables bool) error
- func (vd *VBoxDriver) LoadContext(persisted map[string]interface{}) (hypervisor.DriverContext, error)
- func (vd *VBoxDriver) Name() string
- func (vc *VBoxDriver) SupportLazyMode() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReleasePortMaps ¶
func ReleasePortMaps(vmId string, containerip string, maps []pod.UserContainerPort) error
func SetupPortMaps ¶
func SetupPortMaps(vmId string, containerip string, maps []pod.UserContainerPort) error
Types ¶
type VBoxContext ¶
type VBoxContext struct { Driver *VBoxDriver Machine *virtualbox.Machine // contains filtered or unexported fields }
func (*VBoxContext) AddDir ¶
func (vc *VBoxContext) AddDir(name, path string, readonly bool) error
For shared directory between host and guest OS
func (*VBoxContext) AddDisk ¶
func (vc *VBoxContext) AddDisk(ctx *hypervisor.VmContext, sourceType string, blockInfo *hypervisor.BlockDescriptor)
func (*VBoxContext) AddMem ¶
func (vc *VBoxContext) AddMem(ctx *hypervisor.VmContext, slot, size int, result chan<- error)
func (*VBoxContext) AddNic ¶
func (vc *VBoxContext) AddNic(ctx *hypervisor.VmContext, host *hypervisor.HostNicInfo, guest *hypervisor.GuestNicInfo, result chan<- hypervisor.VmEvent)
func (*VBoxContext) AllocateNetwork ¶
func (vc *VBoxContext) AllocateNetwork(vmId, requestedIP string, maps []pod.UserContainerPort) (*network.Settings, error)
func (*VBoxContext) Associate ¶
func (vc *VBoxContext) Associate(ctx *hypervisor.VmContext)
func (*VBoxContext) Close ¶
func (vc *VBoxContext) Close()
func (*VBoxContext) ConfigureNetwork ¶
func (vc *VBoxContext) ConfigureNetwork(vmId, requestedIP string, maps []pod.UserContainerPort, config pod.UserInterface) (*network.Settings, error)
func (*VBoxContext) CreateVm ¶
func (vc *VBoxContext) CreateVm(name, baseDir, hyperSockFile, ttySockFile string) error
Prepare the conditions for the vm startup * Create VM machine * Create serial port
func (*VBoxContext) Dump ¶
func (vc *VBoxContext) Dump() (map[string]interface{}, error)
func (*VBoxContext) InitVM ¶
func (vc *VBoxContext) InitVM(ctx *hypervisor.VmContext) error
func (*VBoxContext) Kill ¶
func (vc *VBoxContext) Kill(ctx *hypervisor.VmContext)
func (*VBoxContext) Launch ¶
func (vc *VBoxContext) Launch(ctx *hypervisor.VmContext)
Create VM and start it
func (*VBoxContext) LazyAddDisk ¶
func (vc *VBoxContext) LazyAddDisk(ctx *hypervisor.VmContext, name, sourceType, filename, format string, id int)
func (*VBoxContext) LazyAddNic ¶
func (vc *VBoxContext) LazyAddNic(ctx *hypervisor.VmContext, host *hypervisor.HostNicInfo, guest *hypervisor.GuestNicInfo)
func (*VBoxContext) LazyLaunch ¶
func (vc *VBoxContext) LazyLaunch(ctx *hypervisor.VmContext)
func (*VBoxContext) Pause ¶
func (vc *VBoxContext) Pause(ctx *hypervisor.VmContext, pause bool, result chan<- error)
func (*VBoxContext) ReleaseNetwork ¶
func (vc *VBoxContext) ReleaseNetwork(vmId, releasedIP string, maps []pod.UserContainerPort, file *os.File) error
Release an interface for a select ip
func (*VBoxContext) RemoveDir ¶
func (vc *VBoxContext) RemoveDir(name string) error
func (*VBoxContext) RemoveDisk ¶
func (vc *VBoxContext) RemoveDisk(ctx *hypervisor.VmContext, blockInfo *hypervisor.BlockDescriptor, callback hypervisor.VmEvent)
func (*VBoxContext) RemoveNic ¶
func (vc *VBoxContext) RemoveNic(ctx *hypervisor.VmContext, n *hypervisor.InterfaceCreated, callback hypervisor.VmEvent)
func (*VBoxContext) Save ¶
func (vc *VBoxContext) Save(ctx *hypervisor.VmContext, path string, result chan<- error)
func (*VBoxContext) SetCpus ¶
func (vc *VBoxContext) SetCpus(ctx *hypervisor.VmContext, cpus int, result chan<- error)
func (*VBoxContext) Shutdown ¶
func (vc *VBoxContext) Shutdown(ctx *hypervisor.VmContext)
func (*VBoxContext) Stats ¶
func (vc *VBoxContext) Stats(ctx *hypervisor.VmContext) (*types.PodStats, error)
type VBoxDriver ¶
type VBoxDriver struct {
Machines map[string]*hypervisor.VmContext
}
implement the hypervisor.HypervisorDriver interface
func InitDriver ¶
func InitDriver() *VBoxDriver
func (*VBoxDriver) BuildinNetwork ¶
func (vd *VBoxDriver) BuildinNetwork() bool
func (*VBoxDriver) InitContext ¶
func (vd *VBoxDriver) InitContext(homeDir string) hypervisor.DriverContext
func (*VBoxDriver) InitNetwork ¶
func (vd *VBoxDriver) InitNetwork(bIface, bIP string, disableIptables bool) error
func (*VBoxDriver) LoadContext ¶
func (vd *VBoxDriver) LoadContext(persisted map[string]interface{}) (hypervisor.DriverContext, error)
func (*VBoxDriver) Name ¶ added in v0.6.2
func (vd *VBoxDriver) Name() string
func (*VBoxDriver) SupportLazyMode ¶
func (vc *VBoxDriver) SupportLazyMode() bool
Click to show internal directories.
Click to hide internal directories.