vbox

package
v0.0.0-...-eeb3e7f Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileTransferRoot string

Functions

func CreateEventFolder

func CreateEventFolder(tag string) error

func CreateFileTransferRoot

func CreateFileTransferRoot(path string) error
func CreateFolderLink(vm string, eventTag string, teamId string) error

func CreateUserFolder

func CreateUserFolder(teamId string, eventTag string) error

func RemoveEventFolder

func RemoveEventFolder(eventTag string) error

func VBoxCmdContext

func VBoxCmdContext(ctx context.Context, cmd string, cmds ...string) ([]byte, error)

Types

type Library

type Library interface {
	GetCopy(context.Context, store.InstanceConfig, ...VMOpt) (VM, error)
	IsAvailable(string) bool
}

func NewLibrary

func NewLibrary(pwd string) Library

type VBoxErr

type VBoxErr struct {
	Action string
	Output []byte
}

func (*VBoxErr) Error

func (err *VBoxErr) Error() string

type VM

type VM interface {
	virtual.Instance
	Snapshot(string) error
	LinkedClone(context.Context, string, ...VMOpt) (VM, error)
}

func NewVMWithSum

func NewVMWithSum(path, image string, checksum string, vmOpts ...VMOpt) VM

func VmExists

func VmExists(image string, checksum string) (VM, bool)

type VMOpt

type VMOpt func(context.Context, *vm) error

func SetBridge

func SetBridge(nic string) VMOpt

func SetCPU

func SetCPU(cores uint) VMOpt

func SetLocalRDP

func SetLocalRDP(ip string, port uint) VMOpt

func SetRAM

func SetRAM(mb uint) VMOpt

Jump to

Keyboard shortcuts

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