Documentation
¶
Index ¶
- Constants
- type OS
- func (s *OS) GetUnixSocket() string
- func (s *OS) LoadWorkerImage(ctx context.Context, arch string) (string, error)
- func (s *OS) LocalDatabaseDir() string
- func (s *OS) WorkerImageExists(arch string) (string, error)
- func (s *OS) WriteToArtifact(id uuid.UUID, fileName string, reader io.ReadCloser) error
Constants ¶
const WorkerImageBuildPrefix = "worker-img-build_"
WorkerImageBuildPrefix is the prefix used for all files that are written as part of the storage volume creation process for the worker image.
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/).
UsrDir string // Static directory (e.g. /usr/lib/migration-manager/).
ArtifactDir string // Location of user-supplied files (e.g. /var/lib/migration-manager/artifacts/).
ImageDir string // Location of the worker images (e.g. /usr/share/migration-manager/images/).
// contains filtered or unexported fields
}
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 ¶
GetUnixSocket returns the full path to the unix.socket file that this daemon is listening on.
func (*OS) LoadWorkerImage ¶
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 ¶
LocalDatabaseDir returns the path of the local database directory.
func (*OS) WorkerImageExists ¶
WorkerImageExists checks if the worker image and binary exist on the filesystem.
func (*OS) WriteToArtifact ¶
WriteToArtifact reads from the reader and writes to the given file name in the corresponding artifact directory. While the write is in progress, a .part file will be present in the directory.