vmm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound                 = errors.New("not found")
	ErrAlreadyExists            = errors.New("already exists")
	ErrResourceVersionNotLatest = errors.New("resourceVersion is not latest")
	ErrVmInitialized            = errors.New("vm already initialized")

	ErrBrokenSocket = errors.New("broken socket")

	ErrVmNotCreated = errors.New("vm is not created")
)

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(log logr.Logger, paths host.Paths, opts ManagerOptions) (*Manager, error)

func (*Manager) AddDisk

func (m *Manager) AddDisk(ctx context.Context, instanceID string, volume *api.VolumeStatus) error

func (*Manager) AddNIC

func (m *Manager) AddNIC(ctx context.Context, instanceID string, nic *api.NetworkInterfaceStatus) error

func (*Manager) CreateVM

func (m *Manager) CreateVM(ctx context.Context, machine *api.Machine) error

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, instanceID string) error

func (*Manager) FreeApiSocket

func (m *Manager) FreeApiSocket(ctx context.Context, socket string)

func (*Manager) GetFreeApiSocket

func (m *Manager) GetFreeApiSocket() (*string, error)

func (*Manager) GetVM

func (m *Manager) GetVM(ctx context.Context, instanceID string) (*client.VmInfo, error)

func (*Manager) Ping

func (m *Manager) Ping(ctx context.Context, instanceID string) error

func (*Manager) PowerOff

func (m *Manager) PowerOff(ctx context.Context, instanceID string) error

func (*Manager) PowerOn

func (m *Manager) PowerOn(ctx context.Context, instanceID string) error

func (*Manager) RemoveDevice

func (m *Manager) RemoveDevice(ctx context.Context, instanceID string, deviceID string) error

func (*Manager) RemoveNIC

func (m *Manager) RemoveNIC(ctx context.Context, instanceID string, nicName string) error

type ManagerOptions

type ManagerOptions struct {
	CHSocketsPath     string
	FirmwarePath      string
	ReservedInstances []string
}

Jump to

Keyboard shortcuts

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