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

# Functions

NewContainerMap returns a [ContainerMap] optionally initialized from a set of model.Containers.
NewContainerModel returns a new [ContainerModel] for (un)marshalling, optionally preparing it from a list of discovered containers (with managing container engines and groups).
NewDiscoveryResult returns a discovery result object ready for unmarshalling JSON into it or marshalling an existing lxkns [discover.Result] result.
NewEngineMap creates a new map for [ContainerEngine] objects, optionally building using a discovered list of containers (with their container engines).
NewGroupMap creates a new map for [Group] objects.
NewNamespacesDict returns a new and properly initialized [NamespacesDict] ready for use.
NewPIDMap creates a new twin of either an existing [model.PIDMap] or allocates a new and empty model.PIDMap.
NewProcessTable creates a new process table that can be un/marshalled from or to JSON.
WithElement allows API users to add their own top-level elements for un/marshalling to discovery results when using [NewDiscoveryResult].
WithNamespacesDict specifies an existing namespaces dictionary to make use of while unmarshalling the namespace references of processes in a process table.
WithPIDMap configures a new [PIDMap] to wrap an existing [model.PIDMap]; either for marshalling an existing PIDMap or to unmarshal into a pre-allocated PIDMap.
WithPIDNamespaces configures a new [PIDMap] to use an already known map of PID namespaces.
WithProcessTable specifies an existing (model) process table to use for marshalling.
WithResult instructs [NewDiscoveryResult] to use an existing lxkns discovery result (of type [discover.Result]); this is typically used for marshalling only, but not needed for unmarshalling.

# Constants

JSON object field names for the standardized discovery result parts.
JSON object field names for the standardized discovery result parts.
JSON object field names for the standardized discovery result parts.
JSON object field names for the standardized discovery result parts.
JSON object field names for the standardized discovery result parts.
JSON object field names for the standardized discovery result parts.
JSON object field names for the standardized discovery result parts.

# Structs

ContainerMap wraps a set of discovered [model.Containers] for JSON (un)marshalling.
ContainerMarshal basically is [ContainerUnMarshal], but brings in its own labels field so that we can ensure to never marshal a nil map without having to change the underlaying information model container object.
ContainerModel wraps the discovery information model part consisting of containers, their container engines and groups for (un)marshalling from/to JSON.
ContainerUnMarshal is a [model.Container] with additional fields for (un)marshalling the engine and group references, as we cannot directly serialize plain pointers in an information model with lots of cycles.
DiscoveryResult is basically the (digital) twin of an lxkns [discover.Result], adding marshalling and unmarshalling to and from JSON.
EngineMap wraps a set of discovered [model.ContainerEngines] for JSON (un)marshalling.
EngineMarshal is a [model.ContainerEngine] with additional fields for (un)marshalling the container references, as we cannot directly serialize plain pointers in an information model with lots of cycles.
GroupMap wraps a set of discovered [model.Group] objects for JSON (un)marshalling.
GroupMarshal is the evil twin to [GroupUnmarshal], taking care of nil label maps.
GroupUnMarshal is a [model.Group] with additional fields for (un)marshalling the container references, as we cannot directly serialize plain pointers in an information model with lots of cycles.
MountPath wraps a [mounts.MountPathMap] so that it can be marshalled with identifiers in place of mount path object references.
NamespaceMarshal adds those fields to [NamespaceUnmarshal] we marshal as a convenience to some JSON consumers, but which we rather prefer to ignore on unmarshalling.
NamespacesDict is a dictionary of all namespaces, basically a [model.AllNamespaces] but with the added twist of creating new preliminary namespace objects when looking up namespaces which we don't have seen yet.
NamespaceUnMarshal is the JSON serializable (digital!) twin to namespace objects, yet just for unmarshalling: the rationale to differentiate between marshalling and unmarshalling is that on unmarshalling we ignore some information which might be present, as we need to regenerate it anyway after unmarshalling (such as the list of children and the owned namespaces).
PIDMap is the (Digital) Twin of a [model.PIDMap] and can be marshalled and unmarshalled to and from JSON.
ProcessTable is the JSON serializable (digital!) twin to the process table returned from discoveries.

# Type aliases

DiscoveryOptions is the (digital) twin of an lxkns [discover.DiscoverOpts], which can be marshalled and unmarshalled to and from JSON.
MountPathMap is a JSON marshallable mount path map.
NamespacedMountMap is a JSON marshallable map from mount namespace identifiers (inode numbers only) to their respective mount path maps.
NamespacesSetReferences is the JSON representation of a set of typed namespace ID references and thus the JSON face to [model.NamespaceSet].
NewDiscoveryResultOption defines so-called functional options for use with [NewDiscoveryResult].
NewPIDMapOption defines so-called functional options to be used with [NewPIDMap].
NewProcessTableOption defines so-called functional options to be used with [NewProcessTable].
Process is the JSON representation of the information about a single process.
Task is the JSON representation of the information about a single task (of a process).
Tasks is a list of (references to) Task objects.
TaskTable has no representation in the API but instead serves only for unmarshalling tasks.