Documentation ¶
Index ¶
- Constants
- Variables
- func KVMSubsystem() error
- type ConsoleDevice
- type ConsoleTarget
- type CreateParams
- type DestroyParams
- type Device
- type Devices
- type DiskDevice
- type DiskDeviceType
- type DiskSource
- type DiskSourceBlock
- type DiskSourceFile
- type DiskSourceNetwork
- type DiskSourceNetworkHost
- type DiskTarget
- type DiskType
- type Domain
- type DomainType
- type GraphicsDevice
- type GraphicsDeviceType
- type InterfaceDevice
- type InterfaceDeviceMac
- type InterfaceDeviceModel
- type InterfaceDeviceSource
- type InterfaceDeviceSourceBridge
- type InterfaceDeviceType
- type Listen
- type Machine
- type Media
- type Memory
- type OS
- type OSType
- type OSTypeType
- type SerialAlias
- type SerialDevice
- type SerialDeviceType
- type SerialSource
- type SerialTarget
Constants ¶
View Source
const ( DomainTypeKVM = "kvm" OSTypeTypeHVM OSTypeType = "hvm" ArchI686 = "i686" ArchX86_64 = "x86_64" )
View Source
const ( DiskTypeFile DiskType = "file" DiskTypeDir DiskType = "dir" DiskTypeVolume DiskType = "volume" DiskTypeNetwork DiskType = "network" DiskDeviceTypeDisk DiskDeviceType = "disk" DiskDeviceTypeCDROM DiskDeviceType = "cdrom" )
View Source
const ( BaseMACAddress = "00:28:06:82:%x:%x" BaseIPAddr = "172.19.%d.%d" )
View Source
const (
DefaultBridgeName = "kvm-0"
)
Variables ¶
View Source
var ( ReservedSequences = []uint16{0x0, 0x1, 0xffff} BridgeIP = []byte{172, 19, 0, 1} IPRangeStart = fmt.Sprintf("%d.%d.%d.%d", BridgeIP[0], BridgeIP[1], 0, 2) IPRangeEnd = fmt.Sprintf("%d.%d.%d.%d", BridgeIP[0], BridgeIP[1], 255, 254) DefaultBridgeIP = fmt.Sprintf("%d.%d.%d.%d", BridgeIP[0], BridgeIP[1], BridgeIP[2], BridgeIP[3]) DefaultBridgeCIDR = fmt.Sprintf("%s/16", DefaultBridgeIP) )
Functions ¶
func KVMSubsystem ¶ added in v1.0.0
func KVMSubsystem() error
Types ¶
type ConsoleDevice ¶ added in v1.0.0
type ConsoleDevice struct { XMLName xml.Name `xml:"console"` Type SerialDeviceType `xml:"type,attr"` TTY string `xml:"tty,attr"` Source SerialSource `xml:"source"` Target ConsoleTarget `xml:"target"` Alias SerialAlias `xml:"alias"` }
type ConsoleTarget ¶ added in v1.0.0
type CreateParams ¶
type DestroyParams ¶
type DestroyParams struct {
Name string `json:"name"`
}
type DiskDevice ¶
type DiskDevice struct { XMLName xml.Name `xml:"disk"` Type DiskType `xml:"type,attr"` Device DiskDeviceType `xml:"device,attr"` Source DiskSource `xml:"source"` Target DiskTarget `xml:"target"` }
type DiskDeviceType ¶
type DiskDeviceType string
type DiskSource ¶
type DiskSource interface{}
type DiskSourceBlock ¶
type DiskSourceBlock struct {
Dev string `xml:"dev,attr"`
}
type DiskSourceFile ¶
type DiskSourceFile struct {
File string `xml:"file,attr"`
}
type DiskSourceNetwork ¶ added in v1.0.0
type DiskSourceNetwork struct { Protocol string `xml:"protocol,attr"` Host DiskSourceNetworkHost `xml:"host"` Name string `xml:"name,attr,omitempty"` }
type DiskSourceNetworkHost ¶ added in v1.0.0
type DiskTarget ¶
type DomainType ¶
type DomainType string
type GraphicsDevice ¶
type GraphicsDeviceType ¶
type GraphicsDeviceType string
const (
GraphicsDeviceTypeVNC GraphicsDeviceType = "vnc"
)
type InterfaceDevice ¶
type InterfaceDevice struct { XMLName xml.Name `xml:"interface"` Type InterfaceDeviceType `xml:"type,attr"` Source InterfaceDeviceSource `xml:"source"` Model InterfaceDeviceModel `xml:"model"` Mac *InterfaceDeviceMac `xml:"mac,omitempty"` }
type InterfaceDeviceMac ¶ added in v1.0.0
type InterfaceDeviceMac struct {
Address string `xml:"address,attr"`
}
type InterfaceDeviceModel ¶ added in v1.0.0
type InterfaceDeviceModel struct {
Type string `xml:"type,attr"`
}
type InterfaceDeviceSource ¶
type InterfaceDeviceSource interface{}
type InterfaceDeviceSourceBridge ¶
type InterfaceDeviceSourceBridge struct {
Bridge string `xml:"bridge,attr"`
}
type InterfaceDeviceType ¶
type InterfaceDeviceType string
const (
InterfaceDeviceTypeBridge InterfaceDeviceType = "bridge"
)
type Media ¶ added in v1.0.0
type Media struct { URL string `json:"url"` Type DiskDeviceType `json:"type"` Bus string `json:"bus"` }
type OSType ¶
type OSType struct { Type OSTypeType `xml:",chardata"` Arch string `xml:"arch,attr"` }
type OSTypeType ¶
type OSTypeType string
type SerialAlias ¶ added in v1.0.0
type SerialDevice ¶ added in v1.0.0
type SerialDevice struct { XMLName xml.Name `xml:"serial"` Type SerialDeviceType `xml:"type,attr"` Source SerialSource `xml:"source"` Target SerialTarget `xml:"target"` Alias SerialAlias `xml:"alias"` }
type SerialDeviceType ¶ added in v1.0.0
type SerialDeviceType string
const (
SerialDeviceTypePTY SerialDeviceType = "pty"
)
type SerialSource ¶ added in v1.0.0
type SerialTarget ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.