# Packages
Package mountineer allows accessing the file system contents from (other) mount
namespaces via procfs.
Package portable provides so-called “portable” namespace references with
validation and “locking” to the referenced namespace open and thus alive.
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.
# Functions
Execute a function synchronously while switched into the specified namespaces, then returns the interface{} outcome of calling the specified function.
Go runs the specified function as a new Go routine and from a locked OS thread, while joined to the specified namespaces.
NewNamespaceFile returns a new [NamespaceFile] given an *[os.File] and a nil error.
NewTypedNamespaceFd wraps a OS-level file descriptor referencing a Linux-kernel namespace, as well as the type of namespace.
NewTypedNamespaceFile takes an open(!) *[os.File] plus the type of namespace referenced and returns a new typed namespace reference object.
NewTypedNamespacePath returns a new explicitly typed namespace path reference.
Visit locks the OS thread executing the current go routine, then switches the thread into the specified namespaces, and executes f.
# Structs
InvalidNamespaceError wraps an underlying OS-related error when dealing with Linux-kernel namespaces.
NamespaceFile is an open [os.File] which references a Linux-kernel namespace.
NamespaceOperationError wraps an invalid namespace operation (in form of an [InvalidNamespaceError]), giving information about the failed operation both on a high level, as well as the underlying invalid namespace and OS-level errors.
RestoreNamespaceErr represents an error that occurred while trying to restore the original namespaces after [Visit]'ing a function with (some) switched Linux-kernel namespaces.
SwitchNamespaceErr represents an error that occurred while trying to switch into a different namespace.
TypedNamespaceFd references a Linux-kernel namespace via an open file descriptor.
TypedNamespaceFile is a NamespaceFile (wrapping an open os.File) with a foreknown namespace type, optionally to be used in those use cases where the type of namespace referenced is known in advance.
TypedNamespacePath is an explicitly typed NamespacePath reference in the file system.
# Type aliases
NamespaceFd references a Linux-kernel namespace via an open file descriptor.
NamespacePath references a Linux-kernel namespace via a filesystem path.