Documentation ¶
Index ¶
Constants ¶
View Source
const FdOffset = 3
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Emulator describes how to invoke the emulator. This is a // slice where the first element of the slice describes the // path to the executable of the emulator executable and all // other slice elements following the first element are passed // to the emulator executable as arguments. Emulator []string // Environment describes the environment that will be passed // to the emulator binary. The semantics of the Env field // in exec.Cmd apply here. Environment []string // KeepDefaults tells qatapult to launch QEMU keeping // their default configuration. KeepDefaults bool // KeepUserConfig tells qatapult to launch QEMU keeping // their user-provided config files. KeepUserConfig bool // DontUseEnv prevents qatapult from checking for an // environment provided qemu binary configuration. DontUseEnv bool // Devices are devices to expose to the QEMU Guest. Devices *DeviceGroup }
type Description ¶
type Description struct {
// contains filtered or unexported fields
}
Description describes VM arguments from a Config.
func NewDescription ¶
func NewDescription(conf *Config) (d *Description, err error)
NewDescription creates a new Description from the provided Config.
func (Description) CmdLine ¶
func (d Description) CmdLine() []string
func (Description) Files ¶
func (d Description) Files() []*os.File
type DeviceGroup ¶
type DeviceGroup struct {
// contains filtered or unexported fields
}
DeviceGroup groups individual devices together.
func NewDeviceGroup ¶
func NewDeviceGroup(devices ...Device) *DeviceGroup
func (*DeviceGroup) GetCliArgs ¶
func (g *DeviceGroup) GetCliArgs() (out []string, err error)
func (*DeviceGroup) GetFiles ¶
func (g *DeviceGroup) GetFiles() []File
type FilesProvider ¶
type LocalFileOptFn ¶
type LocalFileOptFn func(opts *localFileOpts)
func WithMode ¶
func WithMode(mode int) LocalFileOptFn
func WithPerm ¶
func WithPerm(perm fs.FileMode) LocalFileOptFn
type OsFile ¶
func NewLocalFile ¶
func NewLocalFile(p string, opts ...LocalFileOptFn) (*OsFile, error)
func NewMemoryFile ¶
func NewRemoteFile ¶
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
VM represents a running QEMU virtual machine that was launched with Yeet.
func Yeet ¶
Yeet yeets a VM instance, in style, by launching QEMU with a Description constructed from the given Config.
func YeetDescription ¶
func YeetDescription(ctx context.Context, d *Description, opts ...YeetOption) (*VM, error)
YeetDescription yeets a VM instance, in style, by launching QEMU with the given Description.
type YeetOption ¶
func YeetWithStdPipes ¶
YeetWithStdPipes specifies the std pipes to be used in the given VM.
Click to show internal directories.
Click to hide internal directories.