Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootDevice ¶
type BootDevice string
BootDevice defines model for Boot.Device
const ( BootDeviceCdrom BootDevice = "cdrom" BootDeviceDisk BootDevice = "disk" BootDeviceUnknown BootDevice = "unknown" )
Defines values for BootDevice.
type Cpu ¶
type Cpu struct {
// Counts returns the number of logical cores in the system
Counts int `json:"counts"`
// Percent calculates the percentage of used either per CPU or combined
Percent float64 `json:"percent"`
}
Cpu provides CPU info
This struct depends on gopsutil detail: https://godocs.io/github.com/shirou/gopsutil/v3/cpu
type Disk ¶
type Disk struct {
Device DiskDevice `json:"device"`
Name string `json:"name"`
Pool string `json:"pool"`
Type DiskType `json:"type"`
}
Disk defines model for Disk.
type DiskDevice ¶
type DiskDevice string
DiskDevice defines model for Disk.Device.
const ( DiskDeviceCdrom DiskDevice = "cdrom" DiskDeviceDisk DiskDevice = "disk" DiskDeviceUnknown DiskDevice = "unknown" )
Defines values for DiskDevice.
type Host ¶
type Host struct {
// Cpu is host's CPU
Cpu Cpu `json:"cpu"`
// Memory is host's Memory
Memory Memory `json:"memory"`
// StoragePools is host's storage pools
StoragePools []StoragePool `json:"storage_pools"`
}
Host defines model for Host.
type Memory ¶
type Memory struct {
// This is the kernel's notion of free
Free uint64 `json:"free"`
// Percentage of RAM used by programs
Percent float64 `json:"percent"`
// Total amount of RAM on this system
Total uint64 `json:"total"`
// RAM used by programs
Used uint64 `json:"used"`
}
Memory provides Memory info
This struct depends on gopsutil detail: https://godocs.io/github.com/shirou/gopsutil/v3/mem
type StoragePool ¶
type StoragePool struct {
// Name of storage pool
Name string `json:"name"`
// Path to storage pool
Path string `json:"path"`
// Status of storage pool
Status StoragePoolStatus `json:"status"`
// Total amount of storage pool
TotalSize uint64 `json:"total_size"`
// Used amount of storage pool
UsedSize uint64 `json:"used_size"`
}
StoragePool provides storage pools info
This struct depends on gopsutil detail: https://godocs.io/github.com/shirou/gopsutil/v3/disk
type StoragePoolStatus ¶
type StoragePoolStatus string
StoragePoolStatus defines model for StoragePool.Status.
const ( ACTIVE StoragePoolStatus = "ACTIVE" ERROR StoragePoolStatus = "ERROR" )
Defines values for StoragePoolStatus.
type VirtualizationType ¶
type VirtualizationType string
VirtualizationType defines model for Virtualization.Type
const ( VirtualizationTypeKvm VirtualizationType = "kvm" VirtualizationTypeQemu VirtualizationType = "qemu" VirtualizationTypeUnknown VirtualizationType = "unknown" )
Defines values for VirtualizationType
type Vm ¶
type Vm struct {
VmCore
// ID specifies unique VM and is represented by UUID version 4.
ID uuid.UUID `json:"id"`
Devices Devices `json:"devices"`
Boot BootDevice `json:"boot"`
Virtualization VirtualizationType `json:"virtualization"`
Daemonize bool `json:"daemonize"`
}
Vm defines model for VM