Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterFunc ¶
FilterFunc is a functional type which returns true if the given Mount should be filtered, else false.
func HasPrefix ¶
func HasPrefix(p string) FilterFunc
HasPrefix returns a FilterFunc which returns true if the mountpoint of a given mount has prefix p, else false.
type Mount ¶
type Mount struct { ID int Parent int Major int Minor int Root string MountPoint string Opts map[string]struct{} }
Mount contains information about a single mountpoint entry
type Mounts ¶
type Mounts []*Mount
Mounts represents a sortable set of mountpoint entries. It implements sort.Interface according to unmount order (children first).
func ParseMounts ¶
ParseMounts returns all mountpoints associated with a process mount namespace. The special value 0 as pid argument is used to specify the current process.
func (Mounts) Filter ¶
func (ms Mounts) Filter(f FilterFunc) Mounts
Filter returns a filtered copy of Mounts
func (Mounts) Less ¶
Less ensures that mounts are sorted in an order we can unmount; descendant before ancestor. The requirement of transitivity for Less has to be fulfilled otherwise the sort algorithm will fail.