balloon

package
v0.0.0-...-48d7420 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package balloon provides an automatic libvirt memory balloon daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balloon

type Balloon struct {
	Logger zerolog.Logger // Logger is the zerolog Logger. New creates a default, but feel free to override it.

	Interval time.Duration // Interval is the interval at which the daemon should refresh all domain balloons.
	DryRun   bool          // DryRun effectively pretends running actions like DomainSetMemory, but doesn't.

	FreeAllowance uint64 // FreeAllowance is the amount of memory, in kB, to allow the VM to have available.
	MemoryChunk   uint64 // MemoryChunk is the chunk size of memory (in kB) to allocate or deallocate. This is a granularity slider.
	// contains filtered or unexported fields
}

Balloon describes a hypervisor memory balloon interface.

func New

func New(conn net.Conn) Balloon

New creates a Balloon from a net.Conn and populates its settings with default values.

func (Balloon) ProcessDomain

func (balloon Balloon) ProcessDomain(dom libvirt.Domain)

ProcessDomain will process a domain's memory balloon and log to Balloon.Logger.

func (Balloon) RunDaemon

func (balloon Balloon) RunDaemon()

RunDaemon simply runs ProcessDomain for every domain in the libvirt connection every Interval.

Jump to

Keyboard shortcuts

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