xen

package
v0.0.0-...-7ee4457 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2016 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OnCrashPreserve = "preserve"
)

Variables

This section is empty.

Functions

func Console

func Console(id int) *exec.Cmd

func Create

func Create(paused bool, config string) *exec.Cmd

func Destroy

func Destroy(id int) *exec.Cmd

func List

func List() *exec.Cmd

func Unpause

func Unpause(id int) *exec.Cmd

func Xl

func Xl(args ...string) *exec.Cmd

Types

type Domain

type Domain struct {
	ID     int
	Name   string
	Memory int
	VCPUs  int
	State  DomainState
	Time   float64
}

func DomainWith

func DomainWith(f func(Domain) bool) (*Domain, error)

func DomainWithID

func DomainWithID(id int) (*Domain, error)

func DomainWithName

func DomainWithName(name string) (*Domain, error)

func ListDomains

func ListDomains() ([]Domain, error)

func (Domain) Console

func (domain Domain) Console() *exec.Cmd

func (Domain) Destroy

func (domain Domain) Destroy() *exec.Cmd

func (Domain) Unpause

func (domain Domain) Unpause() *exec.Cmd

func (Domain) Update

func (domain Domain) Update() (*Domain, error)

type DomainState

type DomainState int
const (
	DomainStateUnknown  DomainState = 0x00
	DomainStateRunning  DomainState = 0x01
	DomainStateBlocked  DomainState = 0x02
	DomainStatePaused   DomainState = 0x04
	DomainStateShutdown DomainState = 0x08
	DomainStateCrashed  DomainState = 0x10
	DomainStateDying    DomainState = 0x20
)

func (DomainState) Check

func (state DomainState) Check(mask DomainState) bool

type Kernel

type Kernel struct {
	Binary  string
	Memory  int
	Name    string
	OnCrash string
	VIF     string
}

func (*Kernel) CreatePausedUniqueName

func (kernel *Kernel) CreatePausedUniqueName(f func(cmd *exec.Cmd)) (*Domain, error)

func (Kernel) WriteConfiguration

func (k Kernel) WriteConfiguration(w io.Writer)

Jump to

Keyboard shortcuts

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