qhost

package
v0.0.0-...-ede35a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package qhost identifies and describes host resources that are contributed to a QEMU guest.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver string

Driver identifies a QEMU host resource driver.

type ID

type ID string

ID identifies a host resource.

func (ID) Child

func (id ID) Child(sub string) ID

Child returns a child ID derived from id.

type IOThread

type IOThread struct {
	// contains filtered or unexported fields
}

IOThread is a QEMU I/O Thread object that has been allocated on the host.

func (IOThread) Driver

func (t IOThread) Driver() Driver

Driver returns the object driver, iothread.

func (IOThread) ID

func (t IOThread) ID() ID

ID returns the identifier of the I/O Thread object.

func (IOThread) Properties

func (t IOThread) Properties() Properties

Properties returns the properties of the I/O Thread object.

type NetDev

type NetDev interface {
	ID() ID
	Driver() Driver
	Properties() Properties
}

NetDev is a network device on the QEMU host.

type NetworkTap

type NetworkTap struct {
	// contains filtered or unexported fields
}

NetworkTap is a network tap on the QEMU host.

func (NetworkTap) Driver

func (tap NetworkTap) Driver() Driver

Driver returns the driver used for the host network, tap.

func (NetworkTap) ID

func (tap NetworkTap) ID() ID

ID returns the identifier of the host network tap.

func (NetworkTap) Properties

func (tap NetworkTap) Properties() Properties

Properties returns the properties of the host network tap.

type Properties

type Properties = qemu.Parameters

Properties holds a set of QEMU host resource properties.

type Property

type Property = qemu.Parameter

Property describes a QEMU host resource property.

type Resources

type Resources struct {
	// contains filtered or unexported fields
}

Resources describe the host resources that are available to a virtual machine.

func (*Resources) AddIOThread

func (r *Resources) AddIOThread() (IOThread, error)

AddIOThread adds an IOThread to the host.

func (*Resources) AddNetworkTap

func (r *Resources) AddNetworkTap(ifname string, up, down Script) (NetworkTap, error)

AddNetworkTap adds a network tap to the host configuration.

The newly created tap will have the given network interface name.

If up or down are blank, a default script will be run instead. To disable script execution pass the NoScript value.

func (*Resources) BlockDevs

func (r *Resources) BlockDevs() blockdev.NodeGraph

BlockDevs returns the block device graph for the host block layer.

func (*Resources) CharDevs

func (r *Resources) CharDevs() chardev.Registry

CharDevs returns the character device registry for the host.

func (*Resources) IOThreads

func (r *Resources) IOThreads() []IOThread

IOThreads returns the set of IOThread resources that have been defined.

func (*Resources) NetDevs

func (r *Resources) NetDevs() []NetDev

NetDevs returns the set of network resources that have been defined.

func (*Resources) Options

func (r *Resources) Options() qemu.Options

Options returns a set of QEMU virtual machine options for defining host resources.

type Script

type Script string

Script is a path to an executable script on the QEMU host.

const NoScript Script = "no"

NoScript indicates that no script should be used for the network device.

type SystemDevicePath

type SystemDevicePath string

SystemDevicePath is a sysfs path to a device on the host system.

Directories

Path Synopsis
Package blockdev articulates the QEMU block layer.
Package blockdev articulates the QEMU block layer.
Package chardev desribes the QEMU character device layer.
Package chardev desribes the QEMU character device layer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL