monitor

package
v0.0.0-...-f0802c0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupNICs

func CleanupNICs(vm string, nics []*NIC) error

Types

type Instance

type Instance struct {
	Config *qemu.VirtualMachine `json:"config"`
	Name   string               `json:"name"`
	NICs   []*NIC               `json:"nics"`
	// contains filtered or unexported fields
}

func (*Instance) PID

func (i *Instance) PID() (int, error)

func (*Instance) PIDFile

func (i *Instance) PIDFile() string

func (*Instance) ProcessRunning

func (i *Instance) ProcessRunning() bool

func (*Instance) QMP

func (i *Instance) QMP() (*qmp.QMP, error)

func (*Instance) QMPRunning

func (i *Instance) QMPRunning() (bool, error)

func (*Instance) QMPSocket

func (i *Instance) QMPSocket() string

func (*Instance) QMPStatus

func (i *Instance) QMPStatus() (string, error)

func (*Instance) Reset

func (i *Instance) Reset() error

func (*Instance) Running

func (i *Instance) Running() bool

func (*Instance) Shutdown

func (i *Instance) Shutdown() error

func (*Instance) Start

func (i *Instance) Start() error

func (*Instance) Status

func (i *Instance) Status() string

type Monitor

type Monitor struct {
	ConfigDir  string
	RuntimeDir string
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(configDir string, runtimeDir string) (*Monitor, error)

func (*Monitor) Cleanup

func (m *Monitor) Cleanup()

func (*Monitor) Get

func (m *Monitor) Get(name string) *Instance

func (*Monitor) List

func (m *Monitor) List() ([]string, error)

func (*Monitor) Reset

func (m *Monitor) Reset(name string, result chan error) error

func (*Monitor) Running

func (m *Monitor) Running(name string) bool

func (*Monitor) Shutdown

func (m *Monitor) Shutdown(name string, result chan error) error

func (*Monitor) Start

func (m *Monitor) Start(name string, result chan error) error

func (*Monitor) Status

func (m *Monitor) Status(name string) string

type NIC

type NIC struct {
	ID     string `json:"id"`
	Bridge string `json:"bridge"`
	// contains filtered or unexported fields
}

func (*NIC) Cleanup

func (n *NIC) Cleanup(vm string) error

type Operation

type Operation int
const (
	Start Operation = iota
	Shutdown
	Reset
)

Jump to

Keyboard shortcuts

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