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
func (*Mount) NeedsRemountPrivate ¶
NeedsRemountPrivate checks if this mountPoint needs to be remounted as private, in order for children to be properly unmounted without leaking to parents.
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