Documentation
¶
Overview ¶
Package iface defines injectable operating-system boundaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandRunner ¶
type CommandRunner interface {
Run(name string, args ...string) error
RunWithStdin(stdin string, name string, args ...string) error
RunShell(command string) error
RunWithEnv(env []string, name string, args ...string) error
}
CommandRunner abstracts shell command execution.
type File ¶
type File interface {
io.ReadWriteCloser
Name() string
}
File abstracts read/write/close/name operations on a single file handle.
type FileSystem ¶
type FileSystem interface {
WriteFile(name string, data []byte, perm os.FileMode) error
ReadFile(name string) ([]byte, error)
MkdirAll(path string, perm os.FileMode) error
Stat(name string) (os.FileInfo, error)
Open(name string) (File, error)
Create(name string) (File, error)
CreateTemp(dir, pattern string) (File, error)
Chown(name string, uid, gid int) error
Chmod(name string, mode os.FileMode) error
Rename(oldpath, newpath string) error
Remove(name string) error
Hostname() (string, error)
}
FileSystem abstracts file I/O operations used by appliers.
type HostnameSetter ¶
HostnameSetter abstracts the syscall to set the system hostname.
type LoopAttacher ¶ added in v1.10.0
type LoopAttacher interface {
Attach(backingFile string, offset uint64, readOnly bool) (LoopDevice, error)
}
LoopAttacher abstracts loop device attachment operations.
type LoopDevice ¶ added in v1.10.0
LoopDevice abstracts a single attached loop device.
type ModuleLoader ¶
type ModuleLoader interface {
LoadedModules() (map[string]bool, error)
LoadModule(name string, params string) error
}
ModuleLoader abstracts kernel module loading.
type Mounter ¶
type Mounter interface {
Mount(device, target, mType, options string) error
ForceMount(device, target, mType, options string) error
Mounted(target string) (bool, error)
}
Mounter abstracts filesystem mount operations.
type SysctlApplier ¶
SysctlApplier abstracts sysctl configuration.
Click to show internal directories.
Click to hide internal directories.