Documentation ¶
Index ¶
- Constants
- Variables
- func ContainerID(s string) string
- func KernelVersion() (int, int, int)
- func KernelVersionCode() uint32
- func LookupKernelSymbol(name string) (addr uintptr, ok bool)
- func MountTempFS(source string, target string, fstype string, flags uintptr, data string) error
- func UnmountTempFS(dir string, fstype string) error
Constants ¶
const (
AT_SYSINFO_EHDR uintptr = 33
)
Variables ¶
var CurrentMonotonicRaw = func() int64 { var ts unix.Timespec unix.ClockGettime(unix.CLOCK_MONOTONIC_RAW, &ts) return ts.Nano() }
CurrentMonotonicRaw is a convenience function that returns that current system raw monotonic clock as an integer.
Functions ¶
func ContainerID ¶
ContainerID returns the ContainerID extracted from the given string. The string may simply be a container ID or it may be a full cgroup controller path with a container ID embedded in it. If the given string contains no discernable container ID, the return will be "".
func KernelVersion ¶
KernelVersion returns the version of the currently running kernel in major, minor, patchlevel form.
func KernelVersionCode ¶
func KernelVersionCode() uint32
KernelVersionCode returns a single integer that encodes the version of the running kernel. This code should be treated as having arbitrary meaning.
func LookupKernelSymbol ¶
LookupKernelSymbol returns the address of a symbol from the kernel's vDSO symbol table. The address has been relocated to the load offset in the current process and may be called are accessed directly by the returned address.
func MountTempFS ¶
MountTempFS mounts a filesystem. It is primarily a wrapper around unix.Mount, but it also ensures that the mountpoint exists before attempting to mount to it.
func UnmountTempFS ¶
UnmountTempFS unmounts a filesystem. It is primarily a wrapper around unix.Unmount, but it also removes the mountpoint after the filesystem is unmounted.
Types ¶
This section is empty.