sys

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostProcFS

func HostProcFS() *proc.FileSystem

HostProcFS creates a proc.FileSystem representing the underlying host's procfs. If we are running in the host pid namespace, it uses /proc. Otherwise, it identifies a mounted-in host procfs by it being mounted on a directory that isn't /proc and /proc/self linking to a differing PID than that returned by os.Getpid(). If we are running in a container and no mounted-in host procfs was identified, then it returns nil.

func MountTempFS

func MountTempFS(source string, target string, fstype string, flags uintptr, data string) error

func PerfEventDir

func PerfEventDir() string

PerfEventDir returns the mountpoint of the perf_event cgroup pseudo-filesystem or an empty string if it wasn't found.

func ProcFS

func ProcFS() *proc.FileSystem

ProcFS creates a proc.FileSystem representing the default procfs mountpoint /proc. When running inside a container, this will contain information from the container's pid namespace.

func TracingDir

func TracingDir() string

TracingDir returns the directory on either the debugfs or tracefs used to control the Linux kernel trace event subsystem.

func UnmountTempFS

func UnmountTempFS(dir string, fstype string) error

Types

type Mount

type Mount struct {
	MountID        uint
	ParentID       uint
	Major          uint
	Minor          uint
	Root           string
	MountPoint     string
	MountOptions   []string
	OptionalFields map[string]string
	FilesystemType string
	MountSource    string
	SuperOptions   map[string]string
}

Mount holds information about a mount in the process's mount namespace.

func Mounts

func Mounts() []Mount

Mounts returns the list of currently mounted filesystems.

Directories

Path Synopsis
Package inotify provides an interface to the Linux inotify(7) API for monitoring filesystem events.
Package inotify provides an interface to the Linux inotify(7) API for monitoring filesystem events.

Jump to

Keyboard shortcuts

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