Documentation ¶
Index ¶
- Constants
- func FindAll() (map[string]Process, error)
- type Boot
- type CPU
- type Client
- type Config
- type Console
- type Disk
- type Disks
- type Interface
- type InterfaceType
- type Interfaces
- type LegacyMonitor
- type Machine
- type MemMib
- type Module
- func (m *Module) Delete(name string) error
- func (m *Module) Exists(id string) bool
- func (m *Module) Inspect(name string) (pkg.VMInfo, error)
- func (m *Module) List() ([]string, error)
- func (m *Module) Lock(name string, lock bool) error
- func (m *Module) Logs(name string) (string, error)
- func (m *Module) Metrics() (pkg.MachineMetrics, error)
- func (m *Module) Monitor(ctx context.Context)
- func (m *Module) Run(vm pkg.VM) (pkg.MachineInfo, error)
- func (m *Module) StreamCreate(name string, stream pkg.Stream) error
- func (m *Module) StreamDelete(id string) error
- type Process
- type VMData
- type VirtioFS
Constants ¶
View Source
const (
// ConfigDir [deprecated] is config directory name
ConfigDir = "config"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Boot ¶
type Boot struct { Kernel string `json:"kernel_image_path"` Initrd string `json:"initrd_path,omitempty"` Args string `json:"boot_args"` }
Boot config struct
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client to a cloud hypervisor instance
type Config ¶
type Config struct { CPU CPU `json:"vcpu_count"` Mem MemMib `json:"mem_size_mib"` HTEnabled bool `json:"ht_enabled"` }
Config struct
type Disk ¶
type Disk struct { ID string `json:"drive_id"` Path string `json:"path_on_host"` RootDevice bool `json:"is_root_device"` ReadOnly bool `json:"is_read_only"` }
Disk struct
type Interface ¶
type Interface struct { ID string `json:"iface_id"` Tap string `json:"host_dev_name"` Mac string `json:"guest_mac,omitempty"` Console *Console `json:"console,omitempty"` }
Interface nic struct
type InterfaceType ¶
type InterfaceType string
InterfaceType interface type
const ( // InterfaceTAP tuntap type InterfaceTAP InterfaceType = "tuntap" InterfaceMacvtap InterfaceType = "macvtap" )
type LegacyMonitor ¶
type LegacyMonitor struct {
// contains filtered or unexported fields
}
LegacyMonitor has code to clean up legacy machines death
func (*LegacyMonitor) Monitor ¶
func (m *LegacyMonitor) Monitor(ctx context.Context)
Monitor start vms monitoring
type Machine ¶
type Machine struct { ID string `json:"id"` Boot Boot `json:"boot-source"` Disks Disks `json:"drives"` FS []VirtioFS `json:"fs"` Interfaces Interfaces `json:"network-interfaces"` Config Config `json:"machine-config"` // devices to attack directly to VMd Devices []string `json:"devices"` // NoKeepAlive is not used by firecracker, but instead a marker // for the vm mananger to not restart the machine when it stops NoKeepAlive bool `json:"no-keep-alive"` }
Machine struct
func MachineFromFile ¶
MachineFromFile loads a vm config from file
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module implements the VMModule interface
func NewVMModule ¶
NewVMModule creates a new instance of vm manager
func (*Module) Metrics ¶
func (m *Module) Metrics() (pkg.MachineMetrics, error)
Metrics gets running machines network metrics
func (*Module) StreamCreate ¶
StreamCreate creates a stream for vm `name`
func (*Module) StreamDelete ¶
delete stream by stream id.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.