libvirt

package
v1.15.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MPL-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package libvirt composes the host's modular libvirt clients.

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
}

Client constructs daemon-specific, independently bounded libvirt sessions. The returned clients own their connections; callers must close each one.

func New

func New() *Client

New uses the host-local modular daemon endpoints.

func NewWithConfig

func NewWithConfig(config Config) *Client

NewWithConfig constructs independent connectors for the configured daemons. No connection is made until Storage or Domain is called.

func (*Client) Domain

func (c *Client) Domain(ctx context.Context) (domain.Client, error)

Domain connects to the modular QEMU daemon with the caller's context.

func (*Client) DomainConnector

func (c *Client) DomainConnector() *domain.Connector

DomainConnector exposes the configured QEMU endpoint for long-lived lifecycle watches without changing the timeout of short-lived Domain sessions.

func (*Client) Storage

func (c *Client) Storage(ctx context.Context) (storage.PoolClient, error)

Storage connects to the modular storage daemon with the caller's context.

func (*Client) StorageVolumes

func (c *Client) StorageVolumes(ctx context.Context) (storage.VolumeClient, error)

StorageVolumes connects to the modular storage daemon with the budget volume work needs.

Creating or growing a volume is real filesystem work behind an RPC, unlike the pool metadata calls Storage is sized for.

type Config

type Config struct {
	StorageSocket string
	StorageURI    string
	DomainSocket  string
	DomainURI     string
}

Config identifies the independent libvirt storage and QEMU daemons.

Directories

Path Synopsis
Package domain manages transient QEMU domains owned by this machine.
Package domain manages transient QEMU domains owned by this machine.
Package storage manages host-local persistent directory pools.
Package storage manages host-local persistent directory pools.
copyowner
Package copyowner keeps the on-disk ownership state of pool copies: hidden witnesses and markers, owner and binding records, in-flight stages, and the collection of private artifacts that no longer back a destination.
Package copyowner keeps the on-disk ownership state of pool copies: hidden witnesses and markers, owner and binding records, in-flight stages, and the collection of private artifacts that no longer back a destination.

Jump to

Keyboard shortcuts

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