Documentation
¶
Index ¶
- Constants
- type QemuContext
- func (qc *QemuContext) AddDisk(ctx *hypervisor.VmContext, name, sourceType, filename, format string, id int)
- func (qc *QemuContext) AddNic(ctx *hypervisor.VmContext, host *hypervisor.HostNicInfo, ...)
- func (qc *QemuContext) Associate(ctx *hypervisor.VmContext)
- func (qc *QemuContext) BuildinNetwork() bool
- func (qc *QemuContext) Close()
- func (qc *QemuContext) Dump() (map[string]interface{}, error)
- func (qc *QemuContext) Kill(ctx *hypervisor.VmContext)
- func (qc *QemuContext) Launch(ctx *hypervisor.VmContext)
- func (qc *QemuContext) RemoveDisk(ctx *hypervisor.VmContext, filename, format string, id int, ...)
- func (qc *QemuContext) RemoveNic(ctx *hypervisor.VmContext, device, mac string, callback hypervisor.VmEvent)
- func (qc *QemuContext) Shutdown(ctx *hypervisor.VmContext)
- type QemuDriver
- type QmpCommand
- type QmpError
- type QmpEvent
- type QmpFinish
- type QmpInit
- type QmpInteraction
- type QmpInternalError
- type QmpQuit
- type QmpResponse
- type QmpResult
- type QmpSession
- type QmpTimeStamp
- type QmpTimeout
Constants ¶
View Source
const ( QMP_INIT = iota QMP_SESSION QMP_FINISH QMP_EVENT QMP_INTERNAL_ERROR QMP_QUIT QMP_TIMEOUT QMP_RESULT QMP_ERROR )
View Source
const ( QmpSockName = "qmp.sock" QMP_EVENT_SHUTDOWN = "SHUTDOWN" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QemuContext ¶
type QemuContext struct {
// contains filtered or unexported fields
}
implement the hypervisor.DriverContext interface
func (*QemuContext) AddDisk ¶
func (qc *QemuContext) AddDisk(ctx *hypervisor.VmContext, name, sourceType, filename, format string, id int)
func (*QemuContext) AddNic ¶
func (qc *QemuContext) AddNic(ctx *hypervisor.VmContext, host *hypervisor.HostNicInfo, guest *hypervisor.GuestNicInfo)
func (*QemuContext) Associate ¶
func (qc *QemuContext) Associate(ctx *hypervisor.VmContext)
func (*QemuContext) BuildinNetwork ¶
func (qc *QemuContext) BuildinNetwork() bool
func (*QemuContext) Close ¶
func (qc *QemuContext) Close()
func (*QemuContext) Dump ¶
func (qc *QemuContext) Dump() (map[string]interface{}, error)
func (*QemuContext) Kill ¶
func (qc *QemuContext) Kill(ctx *hypervisor.VmContext)
func (*QemuContext) Launch ¶
func (qc *QemuContext) Launch(ctx *hypervisor.VmContext)
func (*QemuContext) RemoveDisk ¶
func (qc *QemuContext) RemoveDisk(ctx *hypervisor.VmContext, filename, format string, id int, callback hypervisor.VmEvent)
func (*QemuContext) RemoveNic ¶
func (qc *QemuContext) RemoveNic(ctx *hypervisor.VmContext, device, mac string, callback hypervisor.VmEvent)
func (*QemuContext) Shutdown ¶
func (qc *QemuContext) Shutdown(ctx *hypervisor.VmContext)
type QemuDriver ¶
type QemuDriver struct {
// contains filtered or unexported fields
}
implement the hypervisor.HypervisorDriver interface
func (*QemuDriver) InitContext ¶
func (qd *QemuDriver) InitContext(homeDir string) hypervisor.DriverContext
func (*QemuDriver) Initialize ¶
func (qd *QemuDriver) Initialize() error
func (*QemuDriver) LoadContext ¶
func (qd *QemuDriver) LoadContext(persisted map[string]interface{}) (hypervisor.DriverContext, error)
type QmpCommand ¶
type QmpError ¶
type QmpError struct {
Cause map[string]interface{} `json:"error"`
}
func (*QmpError) MessageType ¶
type QmpEvent ¶
type QmpEvent struct { Type string `json:"event"` Timestamp QmpTimeStamp `json:"timestamp"` Data interface{} `json:"data,omitempty"` }
func (*QmpEvent) MessageType ¶
type QmpFinish ¶
type QmpFinish struct {
// contains filtered or unexported fields
}
func (*QmpFinish) MessageType ¶
type QmpInit ¶
type QmpInit struct {
// contains filtered or unexported fields
}
func (*QmpInit) MessageType ¶
type QmpInteraction ¶
type QmpInteraction interface {
MessageType() int
}
type QmpInternalError ¶
type QmpInternalError struct {
// contains filtered or unexported fields
}
func (*QmpInternalError) MessageType ¶
func (qmp *QmpInternalError) MessageType() int
type QmpResponse ¶
type QmpResponse struct {
// contains filtered or unexported fields
}
func (*QmpResponse) UnmarshalJSON ¶
func (qmp *QmpResponse) UnmarshalJSON(raw []byte) error
type QmpResult ¶
type QmpResult struct {
Return map[string]interface{} `json:"return"`
}
func (*QmpResult) MessageType ¶
type QmpSession ¶
type QmpSession struct {
// contains filtered or unexported fields
}
func (*QmpSession) Finish ¶
func (qmp *QmpSession) Finish() *QmpFinish
func (*QmpSession) MessageType ¶
func (qmp *QmpSession) MessageType() int
type QmpTimeStamp ¶
type QmpTimeout ¶
type QmpTimeout struct{}
func (*QmpTimeout) MessageType ¶
func (qmp *QmpTimeout) MessageType() int
Click to show internal directories.
Click to hide internal directories.