Documentation ¶
Overview ¶
Package lxkns discovers Linux kernel namespaces. Please see github.com/thediveo/lxkns/discovery for the specific API to namespace discovery.
For a broader introduction into lxkns, including the service deployment and web user interface, please refer to the 📖online manual.
Additional TDD support can be found in github.com/thediveo/lxkns/test/matchers, implementing domain-specific Gomega matchers about containers, container groups, pods, et cetera.
Index ¶
Constants ¶
View Source
const SemVersion = "0.25.0"
SemVersion is the semantic version string of the lxkns module.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
api
|
|
types
Package types defines the common types for (un)marshalling elements of the lxkns information model from/to JSON.
|
Package types defines the common types for (un)marshalling elements of the lxkns information model from/to JSON. |
cmd
|
|
dumpns
dumpns runs a namespace (and process) discovery and then dumps the results as JSON.
|
dumpns runs a namespace (and process) discovery and then dumps the results as JSON. |
internal/pkg/cli
Package cli handles registering CLI flags via a plug-in mechanism.
|
Package cli handles registering CLI flags via a plug-in mechanism. |
internal/pkg/filter
Package filter provides CLI-controlled filtering of namespaces by type.
|
Package filter provides CLI-controlled filtering of namespaces by type. |
internal/pkg/style
Package style styles text output of the CLI commands with foreground and background colors, as well as different text styles (bold, italics, ...).
|
Package style styles text output of the CLI commands with foreground and background colors, as well as different text styles (bold, italics, ...). |
internal/test/getstdout
Package getstdout captures os.Stdout and os.Stderr while executing a specified function, returning the captured output afterwards.
|
Package getstdout captures os.Stdout and os.Stderr while executing a specified function, returning the captured output afterwards. |
internal/tool
Package tool provides convenience helpers useful to the lxkns CLI tools.
|
Package tool provides convenience helpers useful to the lxkns CLI tools. |
lspidns
lspidns lists the tree of PID namespaces, optionally with their owning user namespaces.
|
lspidns lists the tree of PID namespaces, optionally with their owning user namespaces. |
lsuns
lsuns lists the tree of user namespaces, optionally with the other namespaces they own.
|
lsuns lists the tree of user namespaces, optionally with the other namespaces they own. |
nscaps
nscaps determines a process' capabilities in some namespace.
|
nscaps determines a process' capabilities in some namespace. |
pidtree
pidtree displays a tree (or only a single branch) of processes together with their PID namespaces, and additionally also shows the local PIDs of processes (where applicable).
|
pidtree displays a tree (or only a single branch) of processes together with their PID namespaces, and additionally also shows the local PIDs of processes (where applicable). |
Package containerizer provides the implementations to store data about [Container] and [ContainerEngine] objects.
|
Package containerizer provides the implementations to store data about [Container] and [ContainerEngine] objects. |
whalefriend
Package whalefriend implements a [containerizer.Containerizer] that discovers containers from container engines supported by the [@thediveo/whalewatcher] module, such as Docker and containerd (moby & friends).
|
Package whalefriend implements a [containerizer.Containerizer] that discovers containers from container engines supported by the [@thediveo/whalewatcher] module, such as Docker and containerd (moby & friends). |
Package decorator defines the [Decorate] plug-in interface, where the so-called “decorators” adorn the container information model with additional data, such as container grouping and unified pod-related container labels.
|
Package decorator defines the [Decorate] plug-in interface, where the so-called “decorators” adorn the container information model with additional data, such as container grouping and unified pod-related container labels. |
all
Package all imports and activates all lxkns (container) decorator plugins, activating them during discoveries.
|
Package all imports and activates all lxkns (container) decorator plugins, activating them during discoveries. |
composer
Package composer decorates lxkns information models with (Docker) Composer project groups.
|
Package composer decorates lxkns information models with (Docker) Composer project groups. |
dockerplugin
Package dockerplugin decorates containerd containers that are represent managed Docker plugins.
|
Package dockerplugin decorates containerd containers that are represent managed Docker plugins. |
industrialedge
Package industrialedge decorates the composer-project flavor of [Siemens Industrial Edge] apps (“IE apps”) when an IE App project is detected.
|
Package industrialedge decorates the composer-project flavor of [Siemens Industrial Edge] apps (“IE apps”) when an IE App project is detected. |
kuhbernetes
Package kuhbernetes provides Decorators for “recovering” Kubernetes pods from the containers found.
|
Package kuhbernetes provides Decorators for “recovering” Kubernetes pods from the containers found. |
kuhbernetes/cricontainerd
Package cricontainerd decorates Kubernetes pod groups discovered from CRI-managed containers, based on their CRI-related labels.
|
Package cricontainerd decorates Kubernetes pod groups discovered from CRI-managed containers, based on their CRI-related labels. |
kuhbernetes/dockershim
Package dockershim decorates Kubernetes pod groups discovered from Docker container names managed by the (in)famous Docker shim.
|
Package dockershim decorates Kubernetes pod groups discovered from Docker container names managed by the (in)famous Docker shim. |
podman
Package podman decorates lxkns information models with Podman pod groups.
|
Package podman decorates lxkns information models with Podman pod groups. |
Package discover discovers [Linux kernel namespaces] of types cgroup, ipc, mount, net, pid, time, user, and uts.
|
Package discover discovers [Linux kernel namespaces] of types cgroup, ipc, mount, net, pid, time, user, and uts. |
examples
|
|
internal
|
|
Package log allows consumers of the lxkns module to forward logging originating in the lxkns module to whatever logger module they prefer.
|
Package log allows consumers of the lxkns module to forward logging originating in the lxkns module to whatever logger module they prefer. |
logrus
Package logrus enables logging within the lxkns module and directs all logging output to the sirupsen/logrus logging module.
|
Package logrus enables logging within the lxkns module and directs all logging output to the sirupsen/logrus logging module. |
Package model defines the core of lxkns information model: Linux kernel namespaces and processes, and how they relate to each other; with the additional missing link between processes and user-land containers.
|
Package model defines the core of lxkns information model: Linux kernel namespaces and processes, and how they relate to each other; with the additional missing link between processes and user-land containers. |
Package mounts enhances the Linux kernel's mountinfo data model (as available through "/proc/[PID]/mountinfo") with mount point visibility (“overmounts”) and a hierarchical mount path tree.
|
Package mounts enhances the Linux kernel's mountinfo data model (as available through "/proc/[PID]/mountinfo") with mount point visibility (“overmounts”) and a hierarchical mount path tree. |
Package nstest provides testing support in the context of Linux kernel namespaces.
|
Package nstest provides testing support in the context of Linux kernel namespaces. |
gmodel
Package gmodel provides Gomega matches for lxkns model elements.
|
Package gmodel provides Gomega matches for lxkns model elements. |
Package ops provides a Golang-idiomatic API to the query and switching operations on Linux-kernel namespaces, hiding ioctl()s and syscalls.
|
Package ops provides a Golang-idiomatic API to the query and switching operations on Linux-kernel namespaces, hiding ioctl()s and syscalls. |
internal/opener
Package opener provides access to the file descriptors of namespace references.
|
Package opener provides access to the file descriptors of namespace references. |
mountineer
Package mountineer allows accessing the file system contents from (other) mount namespaces via procfs.
|
Package mountineer allows accessing the file system contents from (other) mount namespaces via procfs. |
mountineer/mntnssandbox
Package mntnssandbox is a single-purpose, stripped-down version of thediveo/gons.
|
Package mntnssandbox is a single-purpose, stripped-down version of thediveo/gons. |
portable
Package portable provides so-called “portable” namespace references with validation and “locking” to the referenced namespace open and thus alive.
|
Package portable provides so-called “portable” namespace references with validation and “locking” to the referenced namespace open and thus alive. |
relations
Package relations gives access to properties of and relationships between Linux-kernel namespaces, such as type and ID of a namespace, its owning user namespace, parent namespace in case of hierarchical namespaces, et cetera.
|
Package relations gives access to properties of and relationships between Linux-kernel namespaces, such as type and ID of a namespace, its owning user namespace, parent namespace in case of hierarchical namespaces, et cetera. |
Package plural supplies lxkns with (only) English-language plurals for common objects appearing in the lxkns information model.
|
Package plural supplies lxkns with (only) English-language plurals for common objects appearing in the lxkns information model. |
Package species defines the type constants and type names of the currently 8 Linux kernel namespace types (“species”).
|
Package species defines the type constants and type names of the currently 8 Linux kernel namespace types (“species”). |
test
|
|
cmd/loosethread
Program loosethread creates a thread (task) that is attached to a newly created network namespace, without attaching this process' other tasks to the new network namespace.
|
Program loosethread creates a thread (task) that is attached to a newly created network namespace, without attaching this process' other tasks to the new network namespace. |
containerdtest
Package containerdtest is a poor-man's dockertest.
|
Package containerdtest is a poor-man's dockertest. |
matcher
Package matcher implements Gomega matchers for lxkns information model artifacts, such as containers and container groups (pods in particular).
|
Package matcher implements Gomega matchers for lxkns information model artifacts, such as containers and container groups (pods in particular). |
Click to show internal directories.
Click to hide internal directories.