Documentation ¶
Index ¶
- func DeepEqual(v1, v2 interface{}) bool
- func QmpConnect(virtualmachine *vmv1.VirtualMachine) (*qmp.SocketMonitor, error)
- func QmpConnectByIP(ip string, port int32) (*qmp.SocketMonitor, error)
- func QmpGetCpus(virtualmachine *vmv1.VirtualMachine) ([]QmpCpuSlot, []QmpCpuSlot, error)
- func QmpGetCpusFromRunner(ip string, port int32) ([]QmpCpuSlot, []QmpCpuSlot, error)
- func QmpGetMemorySize(virtualmachine *vmv1.VirtualMachine) (*resource.Quantity, error)
- func QmpPlugCpu(virtualmachine *vmv1.VirtualMachine) error
- func QmpPlugCpuToRunner(ip string, port int32) error
- func QmpPlugMemory(virtualmachine *vmv1.VirtualMachine) error
- func QmpPlugMemoryToRunner(ip string, port int32, size int64) error
- func QmpQuit(ip string, port int32) error
- func QmpStartMigration(virtualmachine *vmv1.VirtualMachine, ...) error
- func QmpUnplugCpu(virtualmachine *vmv1.VirtualMachine) error
- func QmpUnplugMemory(virtualmachine *vmv1.VirtualMachine) error
- type MigrationInfo
- type QmpCpuSlot
- type QmpCpus
- type QmpMemoryDevice
- type QmpMemoryDevices
- type QmpMemorySize
- type QmpMigrationInfo
- type VirtualMachineMigrationReconciler
- type VirtualMachineReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QmpConnect ¶
func QmpConnect(virtualmachine *vmv1.VirtualMachine) (*qmp.SocketMonitor, error)
func QmpConnectByIP ¶
func QmpConnectByIP(ip string, port int32) (*qmp.SocketMonitor, error)
func QmpGetCpus ¶
func QmpGetCpus(virtualmachine *vmv1.VirtualMachine) ([]QmpCpuSlot, []QmpCpuSlot, error)
func QmpGetCpusFromRunner ¶
func QmpGetCpusFromRunner(ip string, port int32) ([]QmpCpuSlot, []QmpCpuSlot, error)
func QmpGetMemorySize ¶
func QmpGetMemorySize(virtualmachine *vmv1.VirtualMachine) (*resource.Quantity, error)
func QmpPlugCpu ¶
func QmpPlugCpu(virtualmachine *vmv1.VirtualMachine) error
func QmpPlugCpuToRunner ¶
func QmpPlugMemory ¶
func QmpPlugMemory(virtualmachine *vmv1.VirtualMachine) error
func QmpStartMigration ¶
func QmpStartMigration(virtualmachine *vmv1.VirtualMachine, virtualmachinemigration *vmv1.VirtualMachineMigration) error
func QmpUnplugCpu ¶
func QmpUnplugCpu(virtualmachine *vmv1.VirtualMachine) error
func QmpUnplugMemory ¶
func QmpUnplugMemory(virtualmachine *vmv1.VirtualMachine) error
Types ¶
type MigrationInfo ¶
type MigrationInfo struct { Status string `json:"status"` TotalTimeMs int64 `json:"total-time"` SetupTimeMs int64 `json:"setup-time"` DowntimeMs int64 `json:"downtime"` Ram struct { Transferred int64 `json:"transferred"` Remaining int64 `json:"remaining"` Total int64 `json:"total"` Duplicate int64 `json:"duplicate"` Normal int64 `json:"normal"` NormalBytes int64 `json:"normal-bytes"` DirtySyncCount int64 `json:"dirty-sync-count"` } `json:"ram"` Compression struct { CompressedSize int64 `json:"compressed-size"` CompressionRate float64 `json:"compression-rate"` } `json:"compression"` }
func QmpGetMigrationInfo ¶
func QmpGetMigrationInfo(virtualmachine *vmv1.VirtualMachine) (MigrationInfo, error)
type QmpCpuSlot ¶
type QmpMemoryDevice ¶
type QmpMemoryDevice struct { Type string `json:"type"` Data struct { Memdev string `json:"memdev"` Hotplugged bool `json:"hotplugged"` Addr int64 `json:"addr"` Hotplugguble bool `json:"hotpluggable"` Size int64 `json:"size"` Slot int64 `json:"slot"` Node int64 `json:"node"` Id string `json:"id"` } `json:"data"` }
func QmpQueryMemoryDevices ¶
func QmpQueryMemoryDevices(virtualmachine *vmv1.VirtualMachine) ([]QmpMemoryDevice, error)
func QmpQueryMemoryDevicesFromRunner ¶
func QmpQueryMemoryDevicesFromRunner(ip string, port int32) ([]QmpMemoryDevice, error)
type QmpMemoryDevices ¶
type QmpMemoryDevices struct {
Return []QmpMemoryDevice `json:"return"`
}
type QmpMemorySize ¶
type QmpMigrationInfo ¶
type QmpMigrationInfo struct {
Return MigrationInfo `json:"return"`
}
type VirtualMachineMigrationReconciler ¶
type VirtualMachineMigrationReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
VirtualMachineMigrationReconciler reconciles a VirtualMachineMigration object
func (*VirtualMachineMigrationReconciler) Reconcile ¶
func (r *VirtualMachineMigrationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
It is essential for the controller's reconciliation loop to be idempotent. By following the Operator pattern you will create Controllers which provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster. Breaking this recommendation goes against the design principles of controller-runtime. and may lead to unforeseen consequences such as resources becoming stuck and requiring manual intervention. For further info: - About Operator Pattern: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ - About Controllers: https://kubernetes.io/docs/concepts/architecture/controller/ - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile
func (*VirtualMachineMigrationReconciler) SetupWithManager ¶
func (r *VirtualMachineMigrationReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager. Note that the Deployment will be also watched in order to ensure its desirable state on the cluster
type VirtualMachineReconciler ¶
type VirtualMachineReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
VirtualMachineReconciler reconciles a VirtualMachine object
func (*VirtualMachineReconciler) Reconcile ¶
func (r *VirtualMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
It is essential for the controller's reconciliation loop to be idempotent. By following the Operator pattern you will create Controllers which provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster. Breaking this recommendation goes against the design principles of controller-runtime. and may lead to unforeseen consequences such as resources becoming stuck and requiring manual intervention. For further info: - About Operator Pattern: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ - About Controllers: https://kubernetes.io/docs/concepts/architecture/controller/ - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile
func (*VirtualMachineReconciler) SetupWithManager ¶
func (r *VirtualMachineReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager. Note that the Runner Pod will be also watched in order to ensure its desirable state on the cluster