define

package
v4.9.5 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MaxSocketPathLength int = 103

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact int64
const (
	Qemu Artifact = iota
	HyperV
	AppleHV
	None
)

func (Artifact) String

func (a Artifact) String() string

type ImageFormat

type ImageFormat int64
const (
	Qcow ImageFormat = iota
	Vhdx
	Tar
	Raw
)

func (ImageFormat) Kind

func (imf ImageFormat) Kind() string

func (ImageFormat) KindWithCompression

func (imf ImageFormat) KindWithCompression() string

type VMFile

type VMFile struct {
	// Path is the fully qualified path to a file
	Path string
	// Symlink is a shortened version of Path by using
	// a symlink
	Symlink *string `json:"symlink,omitempty"`
}

func NewMachineFile

func NewMachineFile(path string, symlink *string) (*VMFile, error)

NewMachineFile is a constructor for VMFile

func (*VMFile) Delete

func (m *VMFile) Delete() error

Delete removes the machinefile symlink (if it exists) and the actual path

func (*VMFile) GetPath

func (m *VMFile) GetPath() string

GetPath returns the working path for a machinefile. it returns the symlink unless one does not exist

func (*VMFile) Read

func (m *VMFile) Read() ([]byte, error)

Read the contents of a given file and return in []bytes

Jump to

Keyboard shortcuts

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