system

package
v1.4.3-dev Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

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 New

func New() System

func NewWithRoot

func NewWithRoot(root string) System

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

Jump to

Keyboard shortcuts

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