package
0.38.1
Repository: https://github.com/thediveo/lxkns.git
Documentation: pkg.go.dev

# Functions

DiscoverUserNames returns the mapping from user identifiers (uids, found as owners of user namespaces) to their corresponding user names, if any.
FromBindmounts opts to find bind-mounted namespaces.
FromFds opts to find namespaces from the open file descriptors of processes.
FromProcs opts to find namespaces attached to processes.
FromTasks opts to find namespaces attached to tasks (as opposed to processes).
Namespaces returns the Linux kernel namespaces found, based on discovery options specified in the call.
NewlyProcfsPathIsBetter returns true if the passed reference path for a "newly" found namespace reference is "better" than an already known one for that particular namespace.
NewPIDMap returns a new PID map ([model.PIDMapper]) based on the specified discovery results and further information gathered from the /proc filesystem.
NotFromBindmounts opts out from searching for bind-mounted namespaces.
NotFromFds opts out looking at the open file descriptors of processes when searching for namespaces.
NotFromProcs opts out of looking at processes when searching for namespaces.
NotFromTasks opts out of looking at tasks when searching for namespaces.
PIDfromPath returns the PID embedded in a /proc/$PID/..
SameAs reuses the discovery options used for a previous discovery.
SortChildNamespaces returns a sorted copy of a list of hierarchical namespaces.
SortedNamespaces returns the namespaces from a map sorted by their namespace identifiers (inode numbers).
SortNamespaces returns a sorted copy of a list of namespaces.
No description provided by the author
WithContainerizer opts for discovery of containers related to namespaces, using the specified Containerizer.
WithFullDiscovery opts in to all discovery features that lxkns has to offer.
WithHierarchy opts to query the namespace hierarchy of PID and user namespaces.
WithLabel adds a key-value pair to the discovery options.
WithLabels adds a map of key-value pair to the discovery options.
WithMounts opts to find mount points and determine their visibility.
WithNamespaceTypes sets the types of namespaces to discover, where multiple types need to be OR'ed together.
No description provided by the author
WithoutHierarchy opts out of querying the namespace hierarchy of PID and user namespaces.
WithoutMounts opts out of finding mount points and determining their visibility.
WithoutOwnership opts out of looking for the ownership relations between user namespaces and all other namespaces.
WithoutSocketProcesses opts out of finding the relationship between socket inode numbers and process PIDs.
No description provided by the author
WithOwnership opts to find the ownership relations between user namespaces and all other namespaces.
WithPIDMapper opts in to discover the PID mapping between PID namespaces.
WithSocketProcesses opts to find the relationship between socket inode numbers and process PIDs.
WithStandardDiscovery opts for a "standard" discovery, scanning not only processes, but also open file descriptors and bind-mounts, as well as the namespace hierarchy and ownership, and freezer states.
No description provided by the author

# Structs

BindmountedNamespaceInfo describes a bind-mounted namespace in some (other) mount namespace, including the owning user namespace ID, so we can later correctly set up the ownership relations in the discovery results.
DiscoverOpts provides information about the extent of a Linux-kernel namespace discovery.
Result stores the results of a tour through Linux processes and kernel namespaces.

# Type aliases

DiscoveryOption represents a function able to set a particular discovery option state in [DiscoverOpts].
NamespacedMountPathMap maps mount namespaces identified by their namespace ID to their corresponding mount path maps.
SocketProcesses maps socket inode numbers to processes that have open file descriptors for specific sockets.
UidUsernameMap maps user identifiers (uids) to their corresponding user names, if any.