Help us shape the future of Go! Take the 2026 Go Developer Survey

internal/

directory
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0

Directories

Path Synopsis
Package agent implements the Mokka Node Agent: a level-triggered reconciler and supervisor that compiles desired GPU simulation state and fans it out to per-component Simulators in parallel.
Package agent implements the Mokka Node Agent: a level-triggered reconciler and supervisor that compiles desired GPU simulation state and fans it out to per-component Simulators in parallel.
cpulocality
Package cpulocality decides which host CPUs are local to a PCI root complex.
Package cpulocality decides which host CPUs are local to a PCI root complex.
cri
Package cri implements the container runtime simulator: it owns what the node's container runtime needs from Mokka to inject mock GPU devices into workload containers.
Package cri implements the container runtime simulator: it owns what the node's container runtime needs from Mokka to inject mock GPU devices into workload containers.
fabricmanager
Package fabricmanager simulates nv-fabricmanager, the service that registers GPUs with the NVSwitches on an NVSwitch platform before they are usable.
Package fabricmanager simulates nv-fabricmanager, the service that registers GPUs with the NVSwitches on an NVSwitch platform before they are usable.
gpudriver
Package gpudriver implements the GPU driver footprint simulator: chardevs, NVML/CUDA shims, nvidia-smi, procfs entries, engine config, and a bind mount of that tree onto /run/nvidia/driver, the path GPU Operator's own operands default to.
Package gpudriver implements the GPU driver footprint simulator: chardevs, NVML/CUDA shims, nvidia-smi, procfs entries, engine config, and a bind mount of that tree onto /run/nvidia/driver, the path GPU Operator's own operands default to.
host
Package host abstracts on-host filesystem roots so simulators can retarget to t.TempDir() in tests without mounting a real /host.
Package host abstracts on-host filesystem roots so simulators can retarget to t.TempDir() in tests without mounting a real /host.
ib
Package ib implements the InfiniBand HCA simulator: a fake /sys/class/infiniband tree, the LD_PRELOAD shims and IB CLI tools that read it, and the mock-ib daemon serving UMAD and verbs over a Unix socket.
Package ib implements the InfiniBand HCA simulator: a fake /sys/class/infiniband tree, the LD_PRELOAD shims and IB CLI tools that read it, and the mock-ib daemon serving UMAD and verbs over a Unix socket.
imex
Package imex implements the IMEX simulator: the capability surface the NVIDIA kernel module provides (channel character devices, a /proc/devices overlay and the fabric-imex-mgmt capability file), read by the NVIDIA DRA compute-domain kubelet plugin, and the IMEX node software (nvidia-imex and nvidia-imex-ctl) its ComputeDomain daemon runs.
Package imex implements the IMEX simulator: the capability surface the NVIDIA kernel module provides (channel character devices, a /proc/devices overlay and the fabric-imex-mgmt capability file), read by the NVIDIA DRA compute-domain kubelet plugin, and the IMEX node software (nvidia-imex and nvidia-imex-ctl) its ComputeDomain daemon runs.
kernellog
Package kernellog simulates the kernel side of an Xid: the printk a real driver emits when a GPU faults.
Package kernellog simulates the kernel side of an Xid: the printk a real driver emits when a GPU faults.
migcaps
Package migcaps implements the MIG capability surface simulator: the /dev/nvidia-caps character devices, the capabilities/gpu*/mig procfs tree, and the mig-minors table that maps between them.
Package migcaps implements the MIG capability surface simulator: the /dev/nvidia-caps character devices, the capabilities/gpu*/mig procfs tree, and the mig-minors table that maps between them.
nvlink
Package nvlink stages the ComputeDomain topology document, which gives each node its NVLink fabric identity.
Package nvlink stages the ComputeDomain topology document, which gives each node its NVLink fabric identity.
pcibus
Package pcibus implements the PCI bus simulator: it renders a fake /sys/bus/pci/devices tree and stages libmockfs.so so that lspci and topology-aware schedulers see mock GPU BDFs.
Package pcibus implements the PCI bus simulator: it renders a fake /sys/bus/pci/devices tree and stages libmockfs.so so that lspci and topology-aware schedulers see mock GPU BDFs.
source
Package source provides StateSource implementations for the Mokka Node Agent.
Package source provides StateSource implementations for the Mokka Node Agent.
Package controlplane wires the Mokka HTTP and controller processes.
Package controlplane wires the Mokka HTTP and controller processes.
controller
Package controller wires informer snapshots and keyed workqueues to the rack, projection, and status reconcilers, and compiles effective runtime state from runtime policies.
Package controller wires informer snapshots and keyed workqueues to the rack, projection, and status reconcilers, and compiles effective runtime state from runtime policies.
Package cpulist reads and writes the kernel's cpulist format ("0-3,8,10-11"), used by sysfs files such as /sys/devices/system/cpu/online and a PCI device's local_cpulist.
Package cpulist reads and writes the kernel's cpulist format ("0-3,8,10-11"), used by sysfs files such as /sys/devices/system/cpu/online and a PCI device's local_cpulist.
cri
Package cri sets up a node's container runtime for Mokka's CDI specs, as MEP-0006 describes: it installs the NVIDIA Container Toolkit's runtime and hook on the node, and has the toolkit's nvidia-ctk register the nvidia handler with the container runtime.
Package cri sets up a node's container runtime for Mokka's CDI specs, as MEP-0006 describes: it installs the NVIDIA Container Toolkit's runtime and hook on the node, and has the toolkit's nvidia-ctk register the nvidia handler with the container runtime.
containerd
Package containerd registers Mokka's runtime handler with containerd: the toolkit's own nvidia-ctk writes Mokka's config file into containerd's config dir, Mokka adds NRI to it, and systemd restarts containerd to load it.
Package containerd registers Mokka's runtime handler with containerd: the toolkit's own nvidia-ctk writes Mokka's config file into containerd's config dir, Mokka adds NRI to it, and systemd restarts containerd to load it.
Package fabricmanager defines the marker-file protocol that stands in for NVSwitch fabric registration.
Package fabricmanager defines the marker-file protocol that stands in for NVSwitch fabric registration.
Package features declares Mokka's feature gates on top of the Kubernetes component-base feature gate, so operators use the same syntax and lifecycle they know from Kubernetes components.
Package features declares Mokka's feature gates on top of the Kubernetes component-base feature gate, so operators use the same syntax and lifecycle they know from Kubernetes components.
Package fsutil holds the filesystem mutations the mock trees are staged with.
Package fsutil holds the filesystem mutations the mock trees are staged with.
Package gpuarch orders NVIDIA GPU architecture generations so a feature gate can be written as the question it is asking — "Hopper and newer", "before Ampere", "between Ampere and Hopper" — rather than as an integer comparison re-derived at each call site.
Package gpuarch orders NVIDIA GPU architecture generations so a feature gate can be written as the question it is asking — "Hopper and newer", "before Ampere", "between Ampere and Hopper" — rather than as an integer comparison re-derived at each call site.
Package health serves the /healthz, /readyz, and /stagedz probes shared by Mokka binaries.
Package health serves the /healthz, /readyz, and /stagedz probes shared by Mokka binaries.
ib
config
Package config defines the InfiniBand block embedded in mock-nvml profile YAML.
Package config defines the InfiniBand block embedded in mock-nvml profile YAML.
daemon
Package daemon serves the InfiniBand control plane the LD_PRELOAD shims talk to: UMAD and verbs over a Unix socket, plus a TCP relay that exchanges port registrations with peer pods so diagnostics can see a multi-node fabric.
Package daemon serves the InfiniBand control plane the LD_PRELOAD shims talk to: UMAD and verbs over a Unix socket, plus a TCP relay that exchanges port registrations with peer pods so diagnostics can see a multi-node fabric.
daemon/madtest
Package madtest provides shared MAD/UMAD fixtures for mock-ib daemon tests.
Package madtest provides shared MAD/UMAD fixtures for mock-ib daemon tests.
fabric
Package fabric models the mock InfiniBand subnet for SMP synthesis.
Package fabric models the mock InfiniBand subnet for SMP synthesis.
gid
Package gid provides InfiniBand GID / port-GUID string helpers shared by sysfs scanning and the mock-ib daemon.
Package gid provides InfiniBand GID / port-GUID string helpers shared by sysfs scanning and the mock-ib daemon.
protocol
Package protocol defines length-prefixed JSON framing for mock-ib traffic on Unix sockets (libibmockumad shim) and TCP (cross-node fabric).
Package protocol defines length-prefixed JSON framing for mock-ib traffic on Unix sockets (libibmockumad shim) and TCP (cross-node fabric).
registry
Package registry maps InfiniBand port GUIDs to peers for mock-ib fabric routing.
Package registry maps InfiniBand port GUIDs to peers for mock-ib fabric routing.
subnet
Package subnet synthesizes subnet management MAD responses for iblinkinfo.
Package subnet synthesizes subnet management MAD responses for iblinkinfo.
sysfs
Package sysfs owns both halves of the fake InfiniBand sysfs tree: Render writes it from a config.Infiniband spec, Scan reads it back.
Package sysfs owns both halves of the fake InfiniBand sysfs tree: Render writes it from a config.Infiniband spec, Scan reads it back.
Package imex generates the mock IMEX capability surface that the NVIDIA DRA driver's compute-domain kubelet plugin needs on a node with no NVIDIA kernel driver.
Package imex generates the mock IMEX capability surface that the NVIDIA DRA driver's compute-domain kubelet plugin needs on a node with no NVIDIA kernel driver.
Package kmod stages mock kernel module state, and mirrors the node's own modules beside it.
Package kmod stages mock kernel module state, and mirrors the node's own modules beside it.
Package logging provides a shared logger constructor for all Mokka binaries.
Package logging provides a shared logger constructor for all Mokka binaries.
Package migcaps renders the MIG capability tables a MIG-enabled NVIDIA driver publishes, for a node that has no kernel driver at all.
Package migcaps renders the MIG capability tables a MIG-enabled NVIDIA driver publishes, for a node that has no kernel driver at all.
Package nfd writes feature files for the local source of Node Feature Discovery (NFD).
Package nfd writes feature files for the local source of Node Feature Discovery (NFD).
nri
Package nri is the containerd Node Resource Interface plugin that injects the nvml-mock overlay into containers as they are created.
Package nri is the containerd Node Resource Interface plugin that injects the nvml-mock overlay into containers as they are created.
inject
Package inject decides what the nvml-mock overlay adds to a container.
Package inject decides what the nvml-mock overlay adds to a container.
Package pcisysfs defines the schema for the PCI sysfs tree and renders it as a fake /sys/bus/pci/devices + /sys/devices/pciDDDD:BB tree under a configurable root directory.
Package pcisysfs defines the schema for the PCI sysfs tree and renders it as a fake /sys/bus/pci/devices + /sys/devices/pciDDDD:BB tree under a configurable root directory.
sgpu
allocate
Package allocate plans stable Kubernetes-Node-to-logical-Node bindings from immutable snapshots.
Package allocate plans stable Kubernetes-Node-to-logical-Node bindings from immutable snapshots.
assignment
Package assignment owns the versioned Node assignment annotation value.
Package assignment owns the versioned Node assignment annotation value.
inventory
Package inventory reconciles inventories into durable rack resources using informer snapshots.
Package inventory reconciles inventories into durable rack resources using informer snapshots.
metadata
Package metadata defines the Kubernetes metadata surface owned by Mokka.
Package metadata defines the Kubernetes metadata surface owned by Mokka.
nodecatalog
Package nodecatalog maintains the controller's rebuildable, allocation- oriented view of eligible Kubernetes Nodes.
Package nodecatalog maintains the controller's rebuildable, allocation- oriented view of eligible Kubernetes Nodes.
policy
Package policy decides which SGPURuntimePolicies apply to an inventory and compiles the effective runtime state of its simulated GPUs.
Package policy decides which SGPURuntimePolicies apply to an inventory and compiles the effective runtime state of its simulated GPUs.
projection
Package projection derives the small controller-owned Node metadata surface from durable SGPURack bindings.
Package projection derives the small controller-owned Node metadata surface from durable SGPURack bindings.
rackrender
Package rackrender renders immutable rack topology and identities from API inputs without Kubernetes clients, mutable global state, or time.
Package rackrender renders immutable rack topology and identities from API inputs without Kubernetes clients, mutable global state, or time.
release
Package release defines why a durable binding is released and the Node projection cleanup that must be acknowledged before the release completes.
Package release defines why a durable binding is released and the Node projection cleanup that must be acknowledged before the release completes.
status
Package status computes aggregate inventory and rack status, and runtime policy status, from cached controller snapshots and writes only semantic changes.
Package status computes aggregate inventory and rack status, and runtime policy status, from cached controller snapshots and writes only semantic changes.
Package staginggate coordinates node-agent staging with NRI adjustments.
Package staginggate coordinates node-agent staging with NRI adjustments.
Package version carries build-time-injected identity strings.
Package version carries build-time-injected identity strings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL