Documentation ¶
Index ¶
- func CopyFile(src string, dst string) error
- func CreateDirectories() error
- func DeferErr(err *error, f func() error)
- func DirEmpty(dirname string) (b bool)
- func DirExists(dirname string) bool
- func ExecForeground(command string, args ...string) (int, error)
- func ExecuteCommand(command string, args ...string) (string, error)
- func FIPSEnabled() bool
- func FileExists(filename string) bool
- func FileIsEmpty(file string) (bool, error)
- func GenericCheckErr(err error)
- func IsDeviceFile(filename string) (err error)
- func IsEmptyString(input string) bool
- func MaxInt(a, b int) int
- func NewMAC(buffer *[]string) error
- func NewOutput() *output
- func NewUID() (s string, err error)
- func PathExists(path string) (bool, os.FileInfo)
- func RandomName() string
- func TestRoot() error
- func ToLower(a []string) []string
- func WriteFileIfChanged(filename string, data []byte, perm os.FileMode) error
- type MountPoint
- type Prefixer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirectories ¶
func CreateDirectories() error
Creates the /var/lib/firecracker/{vm,image,kernel} directories
func DeferErr ¶ added in v0.5.1
This is a light weight handler to capture errors during detach that would otherwise be silently ignored. Pass a pointer to the error to be returned and the function to run. TODO: Replace all ignored defers with this
func FIPSEnabled ¶ added in v0.4.1
func FIPSEnabled() bool
FIPSEnabled returns true if running in FIPS mode. currently it just checks the system wide /etc/system-fips file present or not. TODO - Find a better generic solution for this.
func FileExists ¶
func FileIsEmpty ¶
FileIsEmpty returns true if the file is empty
func GenericCheckErr ¶ added in v0.5.0
func GenericCheckErr(err error)
GenericCheckErr is used by the commands to check if the action failed and respond with a fatal error provided by the logger (calls os.Exit) Ignite has its own, more detailed implementation of this in cmdutil
func IsDeviceFile ¶ added in v0.5.0
func IsEmptyString ¶
func RandomName ¶
func RandomName() string
Types ¶
type MountPoint ¶
type MountPoint struct {
Path string
}
func Mount ¶
func Mount(volume string) (*MountPoint, error)
func (*MountPoint) Umount ¶
func (mp *MountPoint) Umount() error
type Prefixer ¶ added in v0.4.0
type Prefixer struct {
// contains filtered or unexported fields
}
func NewPrefixer ¶ added in v0.4.0
NewPrefixer returns an immutable prefixer for a specific purpose ex: idPrefix is used to prefix vm, container, and snapshot file/device names