chroot

package
v0.0.0-...-5b8b77a Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chroot

type Chroot interface {
	// Checks if chroot exists.
	Exists() (bool, error)
	// Returns a full chroot location path.
	FullPath() string
	// Checks is chroot looks like a valid chroot.
	IsValid() error
	// Removes the chroot with all contents.
	RemoveAll() error
	// Returns a socket file path, if file exists.
	SocketPathIfExists() (string, bool, error)
	// Returns a socket file path.
	SocketPath() string
}

Chroot represents the chroot.

func NewWithLocation

func NewWithLocation(loc *Location) Chroot

NewWithLocation returns a chroot with the configured location.

type Location

type Location struct {
	ChrootBase string
	FcBinary   string
	VMMID      string
	// contains filtered or unexported fields
}

Location represents the chroot location on disk.

func LocationFromComponents

func LocationFromComponents(base, fcBinary, vmmID string) *Location

LocationFromComponents constructs a location using explicit components.

func LocationFromFullPath

func LocationFromFullPath(path string) *Location

LocationFromFullPath deconstructs a full path to the location.

func (*Location) FullPath

func (o *Location) FullPath() string

FullPath returns a full path of the location.

Jump to

Keyboard shortcuts

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