qemu

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) Index

func (c *Client) Index(ctx context.Context, req IndexRequest) ([]map[string]interface{}, error)

Index QEMU capabilities index.

func (*Client) IndexCpu

func (c *Client) IndexCpu(ctx context.Context, req IndexCpuRequest) ([]IndexCpuResponse, error)

IndexCpu List all custom and default CPU models.

func (*Client) TypesMachines

func (c *Client) TypesMachines(ctx context.Context, req TypesMachinesRequest) ([]TypesMachinesResponse, error)

TypesMachines Get available QEMU/KVM machine types.

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexCpuRequest

type IndexCpuRequest struct {
	Node string `url:"node" json:"node"` // The cluster node name.

}

type IndexCpuResponse

type IndexCpuResponse struct {
	Custom util.PVEBool `url:"custom" json:"custom"` // True if this is a custom CPU model.
	Name   string       `url:"name" json:"name"`     // Name of the CPU model. Identifies it for subsequent API calls. Prefixed with 'custom-' for custom models.
	Vendor string       `url:"vendor" json:"vendor"` // CPU vendor visible to the guest when this model is selected. Vendor of 'reported-model' in case of custom models.

}

type IndexRequest

type IndexRequest struct {
	Node string `url:"node" json:"node"` // The cluster node name.

}

type Type added in v0.0.15

type Type string
const (
	Type_Q35    Type = "q35"
	Type_I440FX Type = "i440fx"
)

func PtrType added in v0.0.15

func PtrType(i Type) *Type

type TypesMachinesRequest

type TypesMachinesRequest struct {
	Node string `url:"node" json:"node"` // The cluster node name.

}

type TypesMachinesResponse

type TypesMachinesResponse struct {
	Id      string `url:"id" json:"id"`           // Full name of machine type and version.
	Type    Type   `url:"type" json:"type"`       // The machine type.
	Version string `url:"version" json:"version"` // The machine version.

}

Jump to

Keyboard shortcuts

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