Documentation ¶
Index ¶
- Constants
- func GetTapFd(device, bridge, options string) (int, error)
- func GetVhostUserPort(device, bridge, sockPath, option string) error
- type QemuContext
- func (qc *QemuContext) AddDisk(ctx *hypervisor.VmContext, sourceType string, ...)
- func (qc *QemuContext) AddMem(ctx *hypervisor.VmContext, slot, size int) error
- func (qc *QemuContext) AddNic(ctx *hypervisor.VmContext, host *hypervisor.HostNicInfo, ...)
- func (qc *QemuContext) Associate(ctx *hypervisor.VmContext)
- 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) Pause(ctx *hypervisor.VmContext, pause bool) error
- func (qc *QemuContext) RemoveDisk(ctx *hypervisor.VmContext, blockInfo *hypervisor.DiskDescriptor, ...)
- func (qc *QemuContext) RemoveNic(ctx *hypervisor.VmContext, n *hypervisor.InterfaceCreated, ...)
- func (qc *QemuContext) Save(ctx *hypervisor.VmContext, path string) error
- func (qc *QemuContext) SetCpus(ctx *hypervisor.VmContext, cpus int) error
- func (qc *QemuContext) Shutdown(ctx *hypervisor.VmContext)
- func (qc *QemuContext) Stats(ctx *hypervisor.VmContext) (*types.PodStats, error)
- type QemuDriver
- func (qd *QemuDriver) InitContext(homeDir string) hypervisor.DriverContext
- func (qd *QemuDriver) LoadContext(persisted map[string]interface{}) (hypervisor.DriverContext, error)
- func (qd *QemuDriver) Name() string
- func (qc *QemuDriver) SupportLazyMode() bool
- func (qc *QemuDriver) SupportVmSocket() bool
- type QemuLogFile
- 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" QemuPidFile = "pidfile" QemuLogDir = "/var/log/hyper/qemu" QMP_EVENT_SHUTDOWN = "SHUTDOWN" )
View Source
const ( IFNAMSIZ = 16 CIFF_TAP = 0x0002 CIFF_NO_PI = 0x1000 CIFF_ONE_QUEUE = 0x2000 )
View Source
const (
QEMU_SYSTEM_EXE = "qemu-system-x86_64"
)
Variables ¶
This section is empty.
Functions ¶
func GetVhostUserPort ¶
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, sourceType string, blockInfo *hypervisor.DiskDescriptor, result chan<- hypervisor.VmEvent)
func (*QemuContext) AddMem ¶
func (qc *QemuContext) AddMem(ctx *hypervisor.VmContext, slot, size int) error
func (*QemuContext) AddNic ¶
func (qc *QemuContext) AddNic(ctx *hypervisor.VmContext, host *hypervisor.HostNicInfo, guest *hypervisor.GuestNicInfo, result chan<- hypervisor.VmEvent)
func (*QemuContext) Associate ¶
func (qc *QemuContext) Associate(ctx *hypervisor.VmContext)
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) Pause ¶
func (qc *QemuContext) Pause(ctx *hypervisor.VmContext, pause bool) error
func (*QemuContext) RemoveDisk ¶
func (qc *QemuContext) RemoveDisk(ctx *hypervisor.VmContext, blockInfo *hypervisor.DiskDescriptor, callback hypervisor.VmEvent, result chan<- hypervisor.VmEvent)
func (*QemuContext) RemoveNic ¶
func (qc *QemuContext) RemoveNic(ctx *hypervisor.VmContext, n *hypervisor.InterfaceCreated, callback hypervisor.VmEvent, result chan<- hypervisor.VmEvent)
func (*QemuContext) Save ¶
func (qc *QemuContext) Save(ctx *hypervisor.VmContext, path string) error
func (*QemuContext) SetCpus ¶
func (qc *QemuContext) SetCpus(ctx *hypervisor.VmContext, cpus int) error
func (*QemuContext) Shutdown ¶
func (qc *QemuContext) Shutdown(ctx *hypervisor.VmContext)
func (*QemuContext) Stats ¶
func (qc *QemuContext) Stats(ctx *hypervisor.VmContext) (*types.PodStats, error)
type QemuDriver ¶
type QemuDriver struct {
// contains filtered or unexported fields
}
implement the hypervisor.HypervisorDriver interface
func InitDriver ¶
func InitDriver() *QemuDriver
func (*QemuDriver) InitContext ¶
func (qd *QemuDriver) InitContext(homeDir string) hypervisor.DriverContext
func (*QemuDriver) LoadContext ¶
func (qd *QemuDriver) LoadContext(persisted map[string]interface{}) (hypervisor.DriverContext, error)
func (*QemuDriver) Name ¶
func (qd *QemuDriver) Name() string
func (*QemuDriver) SupportLazyMode ¶
func (qc *QemuDriver) SupportLazyMode() bool
func (*QemuDriver) SupportVmSocket ¶
func (qc *QemuDriver) SupportVmSocket() bool
type QemuLogFile ¶
type QemuLogFile struct { Name string `json:"name"` Offset int64 `json:"offset"` // contains filtered or unexported fields }
func (*QemuLogFile) Close ¶
func (f *QemuLogFile) Close() error
func (*QemuLogFile) Watch ¶
func (f *QemuLogFile) Watch()
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.