libvmi

package
v0.102.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterfaceDeviceWithMasqueradeBinding

func InterfaceDeviceWithMasqueradeBinding() v1.Interface

InterfaceDeviceWithMasqueradeBinding creates a masquerade interface

func New

func New(opts ...Option) *v1.VirtualMachineInstance

New creates a basic VirtualMachineInstance with functional options

func NewVirtualMachine

func NewVirtualMachine(vmi *v1.VirtualMachineInstance, opts ...VMOption) *v1.VirtualMachine

NewVirtualMachine creates a VirtualMachine from a VMI template

Types

type Option

type Option func(*v1.VirtualMachineInstance)

Option is a functional option for VirtualMachineInstance

func WithInterface

func WithInterface(iface v1.Interface) Option

WithInterface adds a network interface to the VMI

func WithMemory

func WithMemory(memory string) Option

WithMemory sets the memory request

func WithName

func WithName(name string) Option

WithName sets the name for the VMI

func WithNamespace

func WithNamespace(namespace string) Option

WithNamespace sets the namespace for the VMI

func WithNetwork

func WithNetwork(network v1.Network) Option

WithNetwork adds a network to the VMI

type VMOption

type VMOption func(*v1.VirtualMachine)

VMOption is a functional option for VirtualMachine

func WithRunStrategy

func WithRunStrategy(strategy v1.VirtualMachineRunStrategy) VMOption

WithRunStrategy sets the VM run strategy

Jump to

Keyboard shortcuts

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