Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Syscall ¶
type Syscall interface {
Mount(source string, target string, fstype string, flags uintptr, data string) error
Sethostname(p []byte) error
Symlink(oldname, newname string) error
Unmount(path string, flags int) error
}
Syscall provides an interface to make system calls
type System ¶
type System struct {
Hosts etcconf.Hosts // the hosts file on the system, e.g. /etc/hosts
ResolvConf etcconf.ResolvConf // the resolv.conf file on the system, e.g. /etc/resolv.conf
Syscall Syscall // syscall interface for making system calls
// constants
Root string // system's root path
UUID string // machine id
}
func NewWithRoot ¶
NewWithRoot takes a path at which to set the "root" of the system. This will cause the hosts and resolv.conf files to be in their default paths, but relative to that root