sys

package
v0.0.0-pre.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OS

type OS struct {
	// Directories
	CacheDir string // Cache directory (e.g., /var/cache/migration-manager/)
	LogDir   string // Log directory (e.g. /var/log/).
	RunDir   string // Runtime directory (e.g. /run/migration-manager/).
	VarDir   string // Data directory (e.g. /var/lib/migration-manager/).
}

OS is a high-level facade for accessing operating-system level functionalities.

func DefaultOS

func DefaultOS() *OS

DefaultOS returns a fresh uninitialized OS instance with default values.

func (*OS) GetUnixSocket

func (s *OS) GetUnixSocket() string

GetUnixSocket returns the full path to the unix.socket file that this daemon is listening on.

func (*OS) GetVMwareVixName

func (s *OS) GetVMwareVixName() (string, error)

GetVMwareVixName returns the name of the VMWare vix disklib tarball.

func (*OS) GetVirtioDriversISOName

func (s *OS) GetVirtioDriversISOName() (string, error)

GetVirtioDriversISOName returns the name of the virtio drivers ISO image.

func (*OS) LoadVirtioWinISO

func (s *OS) LoadVirtioWinISO() (string, error)

LoadVirtioWinISO attempts to fetch the latest virtio-win ISO, returning the path to the file.

func (*OS) LoadWorkerImage

func (s *OS) LoadWorkerImage(ctx context.Context) error

LoadWorkerImage writes the VMWare vix tarball to the worker image. If the worker image does not exist, it is fetched from the current project version's corresponding GitHub release.

func (*OS) LocalDatabaseDir

func (s *OS) LocalDatabaseDir() string

LocalDatabaseDir returns the path of the local database directory.

Jump to

Keyboard shortcuts

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