vmmanager

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain struct {
	// The domain object
	Dom *libvirt.Domain
	// IP address of the VM.
	IP string
	// Snapshot list the VM has.
	Snapshots []string
}

Domain represents a domain.

type VMManager

type VMManager struct {
	Conn *libvirt.Libvirt
}

func New

func New(transport, address, port, user, sshKeyPath string) (VMManager, error)

New creates a new libvirt RPC connection. It dials libvirt either on the local machine or the remote one depending on the transport parameter "unix" for local and "ssh" for remote connections.

func (*VMManager) Domains

func (vmm *VMManager) Domains() ([]Domain, error)

Domains retrieves the list of domains.

func (*VMManager) Revert

func (vmm *VMManager) Revert(dom libvirt.Domain, name string) error

Revert reverts the domain to a particular snapshot.

Jump to

Keyboard shortcuts

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