Documentation ¶
Index ¶
- Constants
- Variables
- func EventString(ev int) string
- func InitNetwork(bIface, bIP string, disableIptables bool) error
- func NewVmSpec() *hyperstartapi.Pod
- func SupportLazyMode() bool
- func TtyLiner(conn io.Reader, output chan string)
- func UnblockSend(ch chan *types.VmResponse, u *types.VmResponse)
- type AttachCommand
- type BlockdevInsertedEvent
- type BootConfig
- type BuildinNetworkDriver
- type CommonError
- type ConsoleDriverContext
- type ContainerContext
- type DeviceFailed
- type DiskContext
- type DiskDescriptor
- type DriverContext
- type EmptyContext
- func (ec *EmptyContext) AddDisk(ctx *VmContext, sourceType string, blockInfo *DiskDescriptor, ...)
- func (ec *EmptyContext) AddMem(ctx *VmContext, slot, size int) error
- func (ec *EmptyContext) AddNic(ctx *VmContext, host *HostNicInfo, guest *GuestNicInfo, result chan<- VmEvent)
- func (ec *EmptyContext) Associate(ctx *VmContext)
- func (ec *EmptyContext) BuildinNetwork() bool
- func (ec *EmptyContext) Close()
- func (ec *EmptyContext) ConfigureNetwork(config *api.InterfaceDescription) (*network.Settings, error)
- func (ec *EmptyContext) Dump() (map[string]interface{}, error)
- func (ec *EmptyContext) Kill(ctx *VmContext)
- func (ec *EmptyContext) Launch(ctx *VmContext)
- func (ec *EmptyContext) Pause(ctx *VmContext, pause bool) error
- func (ec *EmptyContext) ReleaseNetwork(releasedIP string) error
- func (ec *EmptyContext) RemoveDisk(ctx *VmContext, blockInfo *DiskDescriptor, callback VmEvent, ...)
- func (ec *EmptyContext) RemoveNic(ctx *VmContext, n *InterfaceCreated, callback VmEvent, result chan<- VmEvent)
- func (ec *EmptyContext) Save(ctx *VmContext, path string) error
- func (ec *EmptyContext) SetCpus(ctx *VmContext, cpus int) error
- func (ec *EmptyContext) Shutdown(ctx *VmContext)
- func (ec *EmptyContext) Stats(ctx *VmContext) (*types.PodStats, error)
- type EmptyDriver
- func (ed *EmptyDriver) InitContext(homeDir string) DriverContext
- func (ed *EmptyDriver) Initialize() error
- func (ed *EmptyDriver) LoadContext(persisted map[string]interface{}) (DriverContext, error)
- func (ed *EmptyDriver) Name() string
- func (ed *EmptyDriver) SupportLazyMode() bool
- func (ed *EmptyDriver) SupportVmSocket() bool
- type Errors
- type Fanout
- type GuestNicInfo
- type HostNicInfo
- type HypervisorDriver
- type InitFailedEvent
- type InterfaceCreated
- type Interrupted
- type LazyDriverContext
- type LogMessage
- type NetDevInsertedEvent
- type NetDevRemovedEvent
- type NetworkContext
- type PersistInfo
- type PersistNetworkInfo
- type PersistVolumeInfo
- type ReleaseVMCommand
- type RouteRule
- type ShutdownCommand
- type TtyIO
- type Vm
- func (vm *Vm) AddContainer(c *api.ContainerDescription) api.Result
- func (vm *Vm) AddMem(totalMem int) error
- func (vm *Vm) AddNic(info *api.InterfaceDescription) error
- func (vm *Vm) AddProcess(process *api.Process, tty *TtyIO) error
- func (vm *Vm) AddRoute() error
- func (vm *Vm) AddVolume(vol *api.VolumeDescription) api.Result
- func (vm *Vm) AssociateContainer(container string) (alive bool, err error)
- func (vm *Vm) Attach(tty *TtyIO, container string) error
- func (vm *Vm) ContainerList() []string
- func (vm *Vm) DeleteNic(id string) error
- func (vm *Vm) Dump() ([]byte, error)
- func (vm *Vm) Exec(container, execId, cmd string, terminal bool, tty *TtyIO) error
- func (vm *Vm) GetIPAddrs() []string
- func (vm *Vm) GetResponseChan() (chan *types.VmResponse, error)
- func (vm *Vm) HyperstartExec(cmd string, tty *TtyIO) (int, error)
- func (vm *Vm) HyperstartExecSync(cmd []string, stdin []byte) (stdout, stderr []byte, err error)
- func (vm *Vm) InitSandbox(config *api.SandboxConfig) error
- func (vm *Vm) Kill()
- func (vm *Vm) KillContainer(container string, signal syscall.Signal) error
- func (v *Vm) Log(level hlog.LogLevel, args ...interface{})
- func (v *Vm) LogLevel(level hlog.LogLevel) bool
- func (v *Vm) LogPrefix() string
- func (vm *Vm) OnlineCpuMem() error
- func (vm *Vm) Pause(pause bool) error
- func (vm *Vm) ReadFile(container, target string) ([]byte, error)
- func (vm *Vm) ReleaseResponseChan(ch chan *types.VmResponse)
- func (vm *Vm) ReleaseVm() error
- func (vm *Vm) RemoveContainer(id string) api.Result
- func (vm *Vm) RemoveContainers(ids ...string) (bool, map[string]api.Result)
- func (vm *Vm) RemoveVolume(name string) api.Result
- func (vm *Vm) RemoveVolumes(names ...string) (bool, map[string]api.Result)
- func (vm *Vm) Save(path string) error
- func (vm *Vm) SetCpus(cpus int) error
- func (vm *Vm) Shutdown() api.Result
- func (vm *Vm) SignalProcess(container, process string, signal syscall.Signal) error
- func (vm *Vm) StartContainer(id string) error
- func (vm *Vm) Stats() *types.PodStats
- func (vm *Vm) Tty(containerId, execId string, row, column int) error
- func (vm *Vm) WaitInit() api.Result
- func (vm *Vm) WaitProcess(isContainer bool, ids []string, timeout int) <-chan *api.ProcessExit
- func (vm *Vm) WaitResponse(match matchResponse, timeout int) chan error
- func (vm *Vm) WaitVm(timeout int) <-chan error
- func (vm *Vm) WriteFile(container, target string, data []byte) error
- type VmContext
- func (ctx *VmContext) AddContainer(c *api.ContainerDescription, result chan api.Result)
- func (ctx *VmContext) AddInterface(inf *api.InterfaceDescription, result chan api.Result)
- func (ctx *VmContext) AddPortmapping(ports []*api.PortDescription)
- func (ctx *VmContext) AddVolume(vol *api.VolumeDescription, result chan api.Result)
- func (ctx *VmContext) Become(handler stateHandler, desc string)
- func (ctx *VmContext) Close()
- func (ctx *VmContext) IsRunning() bool
- func (ctx *VmContext) Launch()
- func (ctx *VmContext) Log(level hlog.LogLevel, args ...interface{})
- func (ctx *VmContext) LogLevel(level hlog.LogLevel) bool
- func (ctx *VmContext) LogPrefix() string
- func (ctx *VmContext) NextPciAddr() int
- func (ctx *VmContext) RemoveContainer(id string, result chan<- api.Result)
- func (ctx *VmContext) RemoveInterface(id string, result chan api.Result)
- func (ctx *VmContext) RemoveVolume(name string, result chan<- api.Result)
- func (ctx *VmContext) SendVmEvent(ev VmEvent) error
- func (ctx *VmContext) SetNetworkEnvironment(net *api.SandboxConfig)
- func (ctx *VmContext) WaitSockConnected()
- type VmEvent
- type VmExit
- type VmHwStatus
- type VmKilledEvent
- type VmStartFailEvent
- type VmTimeout
- type VolumeInfo
- type VolumeUnmounted
Constants ¶
const ( BaseDir = "/var/run/hyper" HyperSockName = "hyper.sock" TtySockName = "tty.sock" ConsoleSockName = "console.sock" DefaultKernel = "/var/lib/hyper/kernel" DefaultInitrd = "/var/lib/hyper/hyper-initrd.img" DetachKeys = "ctrl-p,ctrl-q" // cpu/mem hotplug constants DefaultMaxCpus = 8 // CONFIG_NR_CPUS hyperstart.git/build/kernel_config DefaultMaxMem = 32768 // size in MiB )
const ( ST_CREATING = iota ST_CREATED ST_STARTING ST_RUNNING ST_STOPPING )
const ( EVENT_VM_EXIT = iota EVENT_VM_KILL EVENT_VM_TIMEOUT // TODO EVENT_BLOCK_EJECTED EVENT_BLOCK_INSERTED EVENT_INTERFACE_ADD EVENT_INTERFACE_INSERTED EVENT_INTERFACE_EJECTED are not referenced expect in events.go EVENT_BLOCK_INSERTED EVENT_BLOCK_EJECTED EVENT_INTERFACE_ADD EVENT_INTERFACE_INSERTED EVENT_INTERFACE_EJECTED COMMAND_SHUTDOWN COMMAND_RELEASE COMMAND_ATTACH COMMAND_PAUSEVM ERROR_VM_START_FAILED ERROR_INIT_FAIL ERROR_QMP_FAIL ERROR_INTERRUPTED )
const ( PauseStateUnpaused = iota PauseStatePaused )
const ( ET_SPEC string = "SPEC_ERROR" ET_BUSY string = "RESOURSE_UNAVAILABLE" ET_DEVICE string = "DEVICE_OPERATION_FAIL" ET_NOT_READY string = "VM_NOT_READY" )
const ( ERROR = hlog.ERROR WARNING = hlog.WARNING INFO = hlog.INFO DEBUG = hlog.DEBUG TRACE = hlog.TRACE EXTRA = hlog.EXTRA )
const ( MAX_NIC = int(^uint(0) >> 1) // Eth is network card, while lo is alias, what's the maximum for each? same? // let upper level logic care about the restriction. here is just an upbond. DEFAULT_LO_DEVICE_NAME = "lo" )
const ( StateRunning = "RUNNING" StateTerminating = "TERMINATING" StateNone = "NONE" )
states
const CURRENT_PERSIST_VERSION = 20170611
const (
VmLogdSock = "/var/run/vmlogd.sock"
)
Variables ¶
var InterfaceCount int = 1
var PciAddrFrom int = 0x05
var VsockCidManager vsock.VsockCidAllocator
Functions ¶
func EventString ¶
func InitNetwork ¶
func NewVmSpec ¶ added in v0.8.0
func NewVmSpec() *hyperstartapi.Pod
func SupportLazyMode ¶
func SupportLazyMode() bool
func UnblockSend ¶
func UnblockSend(ch chan *types.VmResponse, u *types.VmResponse)
Types ¶
type AttachCommand ¶
func (*AttachCommand) Event ¶
func (qe *AttachCommand) Event() int
type BlockdevInsertedEvent ¶
type BlockdevInsertedEvent struct { DeviceName string ScsiAddr string // pass scsi addr to hyperstart }
func (*BlockdevInsertedEvent) Event ¶
func (qe *BlockdevInsertedEvent) Event() int
type BootConfig ¶
type BootConfig struct { CPU int Memory int BootToBeTemplate bool BootFromTemplate bool EnableVsock bool EnableVhostUser bool MemoryPath string DevicesStatePath string Kernel string Initrd string Bios string Cbfs string Vbox string // For network QoS (kilobytes/s) InboundAverage string InboundPeak string OutboundAverage string OutboundPeak string }
type BuildinNetworkDriver ¶ added in v1.0.0
type BuildinNetworkDriver interface { HypervisorDriver InitNetwork(bIface, bIP string, disableIptables bool) error }
type CommonError ¶ added in v0.8.0
type CommonError struct {
// contains filtered or unexported fields
}
implement error, hypervisor.Error, and api.Result
func NewBusyError ¶ added in v0.8.0
func NewBusyError(id, cause string) *CommonError
func NewDeviceError ¶ added in v0.8.0
func NewDeviceError(id, cause string) *CommonError
func NewNotReadyError ¶ added in v0.8.0
func NewNotReadyError(id string) *CommonError
func NewSpecError ¶ added in v0.8.0
func NewSpecError(id, cause string) *CommonError
Error in spec, which is either mistake format or content inconsistency, and is checked when elements are being added to Sandbox.
func (*CommonError) Error ¶ added in v0.8.0
func (err *CommonError) Error() string
func (*CommonError) IsSuccess ¶ added in v0.8.0
func (err *CommonError) IsSuccess() bool
func (*CommonError) Message ¶ added in v0.8.0
func (err *CommonError) Message() string
func (*CommonError) ResultId ¶ added in v0.8.0
func (err *CommonError) ResultId() string
func (*CommonError) Type ¶ added in v0.8.0
func (err *CommonError) Type() string
type ConsoleDriverContext ¶ added in v1.0.0
type ConsoleDriverContext interface { DriverContext ConnectConsole(console chan<- string) error }
type ContainerContext ¶ added in v0.8.0
type ContainerContext struct { *api.ContainerDescription // contains filtered or unexported fields }
func (*ContainerContext) Log ¶ added in v0.8.0
func (cc *ContainerContext) Log(level hlog.LogLevel, args ...interface{})
func (*ContainerContext) LogPrefix ¶ added in v0.8.0
func (cc *ContainerContext) LogPrefix() string
func (*ContainerContext) VmSpec ¶ added in v0.8.0
func (cc *ContainerContext) VmSpec() *hyperstartapi.Container
type DeviceFailed ¶
type DeviceFailed struct {
Session VmEvent
}
func (*DeviceFailed) Event ¶
func (qe *DeviceFailed) Event() int
func (*DeviceFailed) IsSuccess ¶ added in v0.8.0
func (df *DeviceFailed) IsSuccess() bool
func (*DeviceFailed) Message ¶ added in v0.8.0
func (df *DeviceFailed) Message() string
func (*DeviceFailed) ResultId ¶ added in v0.8.0
func (df *DeviceFailed) ResultId() string
Device Failed as api.Result
type DiskContext ¶ added in v0.8.0
type DiskContext struct { *DiskDescriptor // contains filtered or unexported fields }
func NewDiskContext ¶ added in v0.8.0
func NewDiskContext(ctx *VmContext, vol *api.VolumeDescription) *DiskContext
type DiskDescriptor ¶ added in v0.8.0
type DiskDescriptor struct { Name string Filename string Format string Fstype string DeviceName string ScsiId int ScsiAddr string DockerVolume bool ReadOnly bool Options map[string]string }
func (*DiskDescriptor) IsDir ¶ added in v0.8.0
func (d *DiskDescriptor) IsDir() bool
func (*DiskDescriptor) IsNas ¶ added in v0.8.0
func (d *DiskDescriptor) IsNas() bool
type DriverContext ¶
type DriverContext interface { Launch(ctx *VmContext) Associate(ctx *VmContext) Dump() (map[string]interface{}, error) AddDisk(ctx *VmContext, sourceType string, blockInfo *DiskDescriptor, result chan<- VmEvent) RemoveDisk(ctx *VmContext, blockInfo *DiskDescriptor, callback VmEvent, result chan<- VmEvent) AddNic(ctx *VmContext, host *HostNicInfo, guest *GuestNicInfo, result chan<- VmEvent) RemoveNic(ctx *VmContext, n *InterfaceCreated, callback VmEvent, result chan<- VmEvent) SetCpus(ctx *VmContext, cpus int) error AddMem(ctx *VmContext, slot, size int) error Save(ctx *VmContext, path string) error Shutdown(ctx *VmContext) Kill(ctx *VmContext) Pause(ctx *VmContext, pause bool) error Stats(ctx *VmContext) (*types.PodStats, error) Close() }
type EmptyContext ¶
type EmptyContext struct{}
func (*EmptyContext) AddDisk ¶
func (ec *EmptyContext) AddDisk(ctx *VmContext, sourceType string, blockInfo *DiskDescriptor, result chan<- VmEvent)
func (*EmptyContext) AddNic ¶
func (ec *EmptyContext) AddNic(ctx *VmContext, host *HostNicInfo, guest *GuestNicInfo, result chan<- VmEvent)
func (*EmptyContext) Associate ¶
func (ec *EmptyContext) Associate(ctx *VmContext)
func (*EmptyContext) BuildinNetwork ¶
func (ec *EmptyContext) BuildinNetwork() bool
func (*EmptyContext) Close ¶
func (ec *EmptyContext) Close()
func (*EmptyContext) ConfigureNetwork ¶
func (ec *EmptyContext) ConfigureNetwork(config *api.InterfaceDescription) (*network.Settings, error)
func (*EmptyContext) Dump ¶
func (ec *EmptyContext) Dump() (map[string]interface{}, error)
func (*EmptyContext) Kill ¶
func (ec *EmptyContext) Kill(ctx *VmContext)
func (*EmptyContext) Launch ¶
func (ec *EmptyContext) Launch(ctx *VmContext)
func (*EmptyContext) ReleaseNetwork ¶
func (ec *EmptyContext) ReleaseNetwork(releasedIP string) error
func (*EmptyContext) RemoveDisk ¶
func (ec *EmptyContext) RemoveDisk(ctx *VmContext, blockInfo *DiskDescriptor, callback VmEvent, result chan<- VmEvent)
func (*EmptyContext) RemoveNic ¶
func (ec *EmptyContext) RemoveNic(ctx *VmContext, n *InterfaceCreated, callback VmEvent, result chan<- VmEvent)
func (*EmptyContext) Shutdown ¶
func (ec *EmptyContext) Shutdown(ctx *VmContext)
type EmptyDriver ¶
type EmptyDriver struct{}
func (*EmptyDriver) InitContext ¶
func (ed *EmptyDriver) InitContext(homeDir string) DriverContext
func (*EmptyDriver) Initialize ¶
func (ed *EmptyDriver) Initialize() error
func (*EmptyDriver) LoadContext ¶
func (ed *EmptyDriver) LoadContext(persisted map[string]interface{}) (DriverContext, error)
func (*EmptyDriver) Name ¶ added in v0.6.2
func (ed *EmptyDriver) Name() string
func (*EmptyDriver) SupportLazyMode ¶
func (ed *EmptyDriver) SupportLazyMode() bool
func (*EmptyDriver) SupportVmSocket ¶ added in v0.8.0
func (ed *EmptyDriver) SupportVmSocket() bool
type Fanout ¶
type Fanout struct {
// contains filtered or unexported fields
}
func CreateFanout ¶
func CreateFanout(upstream chan *types.VmResponse, size int, block bool) *Fanout
CreateFanout create a new fanout, and if it is non-blocked, it will start the fanout goroutine at once, otherwise it will start the goroutine when it get the first client
type HostNicInfo ¶
type HypervisorDriver ¶
type HypervisorDriver interface { Name() string InitContext(homeDir string) DriverContext LoadContext(persisted map[string]interface{}) (DriverContext, error) SupportLazyMode() bool SupportVmSocket() bool }
var HDriver HypervisorDriver
type InitFailedEvent ¶
type InitFailedEvent struct {
Reason string
}
func (*InitFailedEvent) Event ¶
func (qe *InitFailedEvent) Event() int
type InterfaceCreated ¶
type InterfaceCreated struct { Id string //user specified in (ref api.InterfaceDescription: a user identifier of interface, user may use this to specify a nic, normally you can use IPAddr as an Id, however, in some driver (probably vbox?), user may not specify the IPAddr.) Index int PCIAddr int Bridge string HostDevice string DeviceName string MacAddr string IpAddr string RouteTable []*RouteRule }
func (*InterfaceCreated) Event ¶
func (qe *InterfaceCreated) Event() int
type Interrupted ¶
type Interrupted struct {
Reason string
}
func (*Interrupted) Event ¶
func (qe *Interrupted) Event() int
type LazyDriverContext ¶
type LazyDriverContext interface { DriverContext LazyLaunch(ctx *VmContext) InitVM(ctx *VmContext) error LazyAddDisk(ctx *VmContext, name, sourceType, filename, format string, id int) LazyAddNic(ctx *VmContext, host *HostNicInfo, guest *GuestNicInfo) }
type LogMessage ¶ added in v0.8.1
type NetDevInsertedEvent ¶
func (*NetDevInsertedEvent) Event ¶
func (qe *NetDevInsertedEvent) Event() int
func (*NetDevInsertedEvent) IsSuccess ¶ added in v0.8.0
func (ne *NetDevInsertedEvent) IsSuccess() bool
func (*NetDevInsertedEvent) Message ¶ added in v0.8.0
func (ne *NetDevInsertedEvent) Message() string
func (*NetDevInsertedEvent) ResultId ¶ added in v0.8.0
func (ne *NetDevInsertedEvent) ResultId() string
type NetDevRemovedEvent ¶
type NetDevRemovedEvent struct {
Index int
}
func (*NetDevRemovedEvent) Event ¶
func (qe *NetDevRemovedEvent) Event() int
type NetworkContext ¶ added in v0.8.0
type NetworkContext struct { *api.SandboxConfig // contains filtered or unexported fields }
func NewNetworkContext ¶ added in v0.8.0
func NewNetworkContext() *NetworkContext
type PersistInfo ¶
type PersistInfo struct { PersistVersion int Id string Paused bool DriverInfo map[string]interface{} VmSpec *hyperstartapi.Pod HwStat *VmHwStatus VolumeList []*PersistVolumeInfo NetworkList []*PersistNetworkInfo PortList []*api.PortDescription }
func (*PersistInfo) Log ¶ added in v0.8.1
func (p *PersistInfo) Log(level hlog.LogLevel, args ...interface{})
func (*PersistInfo) LogLevel ¶ added in v0.8.1
func (p *PersistInfo) LogLevel(level hlog.LogLevel) bool
func (*PersistInfo) LogPrefix ¶ added in v0.8.1
func (p *PersistInfo) LogPrefix() string
type PersistNetworkInfo ¶
type PersistVolumeInfo ¶
type ReleaseVMCommand ¶
type ReleaseVMCommand struct{}
func (*ReleaseVMCommand) Event ¶
func (qe *ReleaseVMCommand) Event() int
type ShutdownCommand ¶
type ShutdownCommand struct {
Wait bool
}
func (*ShutdownCommand) Event ¶
func (qe *ShutdownCommand) Event() int
type Vm ¶
func AssociateVm ¶ added in v0.8.0
This function will only be invoked during daemon start
func (*Vm) AddContainer ¶ added in v0.8.0
func (vm *Vm) AddContainer(c *api.ContainerDescription) api.Result
func (*Vm) AddVolume ¶ added in v0.8.0
func (vm *Vm) AddVolume(vol *api.VolumeDescription) api.Result
func (*Vm) AssociateContainer ¶ added in v0.8.0
Should only be called near after AssociateVm
func (*Vm) ContainerList ¶ added in v1.0.0
func (*Vm) GetIPAddrs ¶ added in v0.8.0
func (*Vm) GetResponseChan ¶
func (vm *Vm) GetResponseChan() (chan *types.VmResponse, error)
func (*Vm) HyperstartExec ¶ added in v0.8.0
func (*Vm) HyperstartExecSync ¶ added in v0.8.0
func (*Vm) InitSandbox ¶ added in v0.8.0
func (vm *Vm) InitSandbox(config *api.SandboxConfig) error
func (*Vm) KillContainer ¶
func (*Vm) OnlineCpuMem ¶
func (*Vm) ReleaseResponseChan ¶
func (vm *Vm) ReleaseResponseChan(ch chan *types.VmResponse)
func (*Vm) RemoveContainers ¶ added in v0.8.0
func (*Vm) RemoveVolumes ¶ added in v0.8.0
func (*Vm) SignalProcess ¶ added in v0.8.0
func (*Vm) StartContainer ¶ added in v0.8.0
func (*Vm) WaitProcess ¶ added in v0.8.0
func (*Vm) WaitResponse ¶ added in v0.8.0
type VmContext ¶
type VmContext struct { Id string PauseState int Boot *BootConfig // Communication Context Hub chan VmEvent DCtx DriverContext HomeDir string HyperSockName string TtySockName string ConsoleSockName string GuestCid uint32 // contains filtered or unexported fields }
func InitContext ¶
func InitContext(id string, hub chan VmEvent, client chan *types.VmResponse, dc DriverContext, boot *BootConfig) (*VmContext, error)
func VmAssociate ¶
func (*VmContext) AddContainer ¶ added in v0.8.0
func (ctx *VmContext) AddContainer(c *api.ContainerDescription, result chan api.Result)
func (*VmContext) AddInterface ¶ added in v0.8.0
func (ctx *VmContext) AddInterface(inf *api.InterfaceDescription, result chan api.Result)
func (*VmContext) AddPortmapping ¶ added in v0.8.0
func (ctx *VmContext) AddPortmapping(ports []*api.PortDescription)
func (*VmContext) AddVolume ¶ added in v0.8.0
func (ctx *VmContext) AddVolume(vol *api.VolumeDescription, result chan api.Result)
func (*VmContext) NextPciAddr ¶ added in v0.8.0
func (*VmContext) RemoveContainer ¶ added in v0.8.0
func (*VmContext) RemoveInterface ¶ added in v0.8.0
func (*VmContext) RemoveVolume ¶ added in v0.8.0
func (*VmContext) SendVmEvent ¶ added in v0.8.0
SendVmEvent enqueues a VmEvent onto the context. Returns an error if there is no handler associated with the context. VmEvent handling happens in a separate goroutine, so this is thread-safe and asynchronous.
func (*VmContext) SetNetworkEnvironment ¶ added in v0.8.0
func (ctx *VmContext) SetNetworkEnvironment(net *api.SandboxConfig)
User API
func (*VmContext) WaitSockConnected ¶ added in v1.0.0
func (ctx *VmContext) WaitSockConnected()
type VmHwStatus ¶
type VmKilledEvent ¶
type VmKilledEvent struct {
Success bool
}
func (*VmKilledEvent) Event ¶
func (qe *VmKilledEvent) Event() int
type VmStartFailEvent ¶
type VmStartFailEvent struct {
Message string
}
func (*VmStartFailEvent) Event ¶
func (qe *VmStartFailEvent) Event() int
type VolumeInfo ¶
type VolumeUnmounted ¶
func (*VolumeUnmounted) Event ¶
func (qe *VolumeUnmounted) Event() int