internal/

directory
v0.0.0-...-6ed2b60 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0

Directories

Path Synopsis
Package agent is the composition root: it wires state, scraper, metrics, runtime and logging onto an HTTP server — the glue between the BPF data plane and the Prometheus endpoint.
Package agent is the composition root: it wires state, scraper, metrics, runtime and logging onto an HTTP server — the glue between the BPF data plane and the Prometheus endpoint.
Package boot tracks the agent's startup phases as one monotonically advancing sequence.
Package boot tracks the agent's startup phases as one monotonically advancing sequence.
Package bpf exposes the kernel↔userspace ABI for the telemetry agent.
Package bpf exposes the kernel↔userspace ABI for the telemetry agent.
Package config holds the agent's runtime configuration as nested sections — one Go file per section, each owning its type, defaults and Validate; this file aggregates them.
Package config holds the agent's runtime configuration as nested sections — one Go file per section, each owning its type, defaults and Validate; this file aggregates them.
Package debug serves the agent's operator-facing /debug surface: an HTML index with sync health and anomaly counts, detail pages for attribution state, and the stdlib pprof handlers.
Package debug serves the agent's operator-facing /debug surface: an HTML index with sync health and anomaly counts, detail pages for attribution state, and the stdlib pprof handlers.
Package gc owns the agent's eviction work: the lingering-ghost sweep (this file) and pressure-relief eviction (pressure.go).
Package gc owns the agent's eviction work: the lingering-ghost sweep (this file) and pressure-relief eviction (pressure.go).
Package kafka consumes oslo.messaging notifications and kicks a Neutron reconcile on each committed metadata change, so metadata refreshes within a pass instead of waiting for the periodic net.
Package kafka consumes oslo.messaging notifications and kicks a Neutron reconcile on each committed metadata change, so metadata refreshes within a pass instead of waiting for the periodic net.
Package kernelwriter pushes userspace metadata and trie entries into the kernel BPF maps.
Package kernelwriter pushes userspace metadata and trie entries into the kernel BPF maps.
Package loadtest implements the CubeCOS network-telemetry resource budget test: spawn the agent as a subprocess, drive sustained TCP traffic through a netns + veth, and verify the agent stays inside configured RSS and CPU thresholds while actually observing the load on its BPF data plane.
Package loadtest implements the CubeCOS network-telemetry resource budget test: spawn the agent as a subprocess, drive sustained TCP traffic through a netns + veth, and verify the agent stays inside configured RSS and CPU thresholds while actually observing the load on its BPF data plane.
Package logging configures the agent's structured logger.
Package logging configures the agent's structured logger.
Package metadata is the userspace mirror of the kernel `mac_tenant_map`, mapping a VM MAC to a *TenantMeta carrying the attributes the kernel cannot store.
Package metadata is the userspace mirror of the kernel `mac_tenant_map`, mapping a VM MAC to a *TenantMeta carrying the attributes the kernel cannot store.
Package metrics implements the Prometheus custom Collector that exposes the billing families from state.GlobalState.
Package metrics implements the Prometheus custom Collector that exposes the billing families from state.GlobalState.
Package netlink discovers tap interfaces via RTM_NEWLINK / RTM_DELLINK and dynamically attaches the telemetry TC programs to each match, replacing the earlier static single-interface attach.
Package netlink discovers tap interfaces via RTM_NEWLINK / RTM_DELLINK and dynamically attaches the telemetry TC programs to each match, replacing the earlier static single-interface attach.
Package neutron is the OpenStack metadata path: Keystone auth, the Neutron API client, the trie builder, and the Neutron struct carrying one sync's outputs to the rest of the agent.
Package neutron is the OpenStack metadata path: Keystone auth, the Neutron API client, the trie builder, and the Neutron struct carrying one sync's outputs to the rest of the agent.
Package osclient is the shared OpenStack client bootstrap: the Credentials vocabulary, the admin-openrc parser (ParseOpenRC), and Keystone v3 authentication (Authenticate, AuthenticateProject).
Package osclient is the shared OpenStack client bootstrap: the Credentials vocabulary, the admin-openrc parser (ParseOpenRC), and Keystone v3 authentication (Authenticate, AuthenticateProject).
Package perfbench measures the per-packet runtime of the telemetry classifier via BPF_PROG_TEST_RUN.
Package perfbench measures the per-packet runtime of the telemetry classifier via BPF_PROG_TEST_RUN.
Package reconcile owns the periodic Neutron reconcile: a 5-minute safety net that re-fetches the full snapshot and applies only the rows that changed, so metadata staleness stays bounded by one interval even through a Kafka outage.
Package reconcile owns the periodic Neutron reconcile: a 5-minute safety net that re-fetches the full snapshot and applies only the rows that changed, so metadata staleness stays bounded by one interval even through a Kafka outage.
Package runtime wires reload and debug controls onto the agent: the Manager holds the current config, re-reads the YAML on SIGHUP, applies the hot-reloadable fields, and serves /debug.
Package runtime wires reload and debug controls onto the agent: the Manager holds the current config, re-reads the YAML on SIGHUP, applies the hot-reloadable fields, and serves /debug.
Package scenariotest is the core of the live-validation harness: the scenario DSL, the step seam, the run-state, the report, and the Cloud / MetricsSource / VMExec interfaces through which everything reaches a real cluster.
Package scenariotest is the core of the live-validation harness: the scenario DSL, the step seam, the run-state, the report, and the Cloud / MetricsSource / VMExec interfaces through which everything reaches a real cluster.
agentctl
Package agentctl drives the telemetry agent on a compute host: the systemd lifecycle, the on-host config, the durable state a cold restart destroys, and the readiness gate proving the process cycled.
Package agentctl drives the telemetry agent on a compute host: the systemd lifecycle, the on-host config, the durable state a cold restart destroys, and the readiness gate proving the process cycled.
agentmetrics
Package agentmetrics is the live scenariotest.MetricsSource: it reads a running agent's observability surfaces over HTTP — the Prometheus text exposition at /metrics and the JSON /debug queries on the same listener — and parses them into the harness's sample types.
Package agentmetrics is the live scenariotest.MetricsSource: it reads a running agent's observability surfaces over HTTP — the Prometheus text exposition at /metrics and the JSON /debug queries on the same listener — and parses them into the harness's sample types.
assert
Package assert evaluates a scenario's declared expectations against the agents' live /metrics as lower bounds on the delta from the drive-time baseline, polling until every expectation passes or the stabilize deadline fires.
Package assert evaluates a scenario's declared expectations against the agents' live /metrics as lower bounds on the delta from the drive-time baseline, polling until every expectation passes or the stabilize deadline fires.
down
Package down tears a realized scenario back down: every resource the run-state records, in dependency order, idempotently.
Package down tears a realized scenario back down: every resource the run-state records, in dependency order, idempotently.
drive
Package drive pushes a scenario's declared flows as real traffic between the realized VMs, over SSH, after gating on the agents having learned the participating MACs.
Package drive pushes a scenario's declared flows as real traffic between the realized VMs, over SSH, after gating on the agents having learned the participating MACs.
fake
Package fake is the harness's shared test double: an in-memory scenariotest.Cloud that models the Neutron/Nova behaviour the phases actually depend on (floating-IP reachability, port binding, router-route ordering), plus the matching MetricsSource and VMExec.
Package fake is the harness's shared test double: an in-memory scenariotest.Cloud that models the Neutron/Nova behaviour the phases actually depend on (floating-IP reachability, port binding, router-route ordering), plus the matching MetricsSource and VMExec.
gate
Package gate holds the poll-until-predicate waits the harness uses to sequence a scenario against a cluster that changes asynchronously.
Package gate holds the poll-until-predicate waits the harness uses to sequence a scenario against a cluster that changes asynchronously.
openstack
Package openstack is the gophercloud-backed scenariotest.Cloud: every live OpenStack call the harness makes to realize, mutate and tear down a scenario's topology.
Package openstack is the gophercloud-backed scenariotest.Cloud: every live OpenStack call the harness makes to realize, mutate and tear down a scenario's topology.
preflight
Package preflight verifies, without mutating anything, that a live cluster can run a scenario: every prerequisite resolves, any pinned hypervisor exists, and every configured agent is scraping and exposing the metric families the harness depends on.
Package preflight verifies, without mutating anything, that a live cluster can run a scenario: every prerequisite resolves, any pinned hypervisor exists, and every configured agent is scraping and exposing the metric families the harness depends on.
realize
Package realize stands a scenario's declared topology up on the live cluster and blocks until the agents have attached to the new taps.
Package realize stands a scenario's declared topology up on the live cluster and blocks until the agents have attached to the new taps.
remote
Package remote runs commands on hosts the harness does not own — the scenario VMs it drives traffic through, and the agent hosts it restarts.
Package remote runs commands on hosts the harness does not own — the scenario VMs it drives traffic through, and the agent hosts it restarts.
run
Package run composes the whole loop — preflight, up, the scenario's step script, down — into the single command CI and operators invoke.
Package run composes the whole loop — preflight, up, the scenario's step script, down — into the single command CI and operators invoke.
steps
Package steps is the step vocabulary a scripted scenario is written in: an ordered program the run executes between up and down, able to express the mid-run lifecycle events the classic drive-all/assert-all loop cannot — deleting a VM, waiting out the agent's ghost sweep, rebooting a MAC under another tenant, restarting an agent cold.
Package steps is the step vocabulary a scripted scenario is written in: an ordered program the run executes between up and down, able to express the mid-run lifecycle events the classic drive-all/assert-all loop cannot — deleting a VM, waiting out the agent's ghost sweep, rebooting a MAC under another tenant, restarting an agent cold.
Package scraper drives BPF telemetry-map collection: one goroutine drains the kernel map on a tick and folds each reading into state.GlobalState.
Package scraper drives BPF telemetry-map collection: one goroutine drains the kernel map on a tick and folds each reading into state.GlobalState.
Package state owns the agent's authoritative cumulative counters, keyed by bpf.FlowKey — the staging area between the scraper, which feeds raw kernel readings, and the metrics Collector, which emits cumulatives to Prometheus.
Package state owns the agent's authoritative cumulative counters, keyed by bpf.FlowKey — the staging area between the scraper, which feeds raw kernel readings, and the metrics Collector, which emits cumulatives to Prometheus.
Package tcattach binds BPF programs to a netlink link via the kernel's TC clsact qdisc and a direct-action filter at the ingress or egress hook.
Package tcattach binds BPF programs to a netlink link via the kernel's TC clsact qdisc and a direct-action filter at the ingress or egress hook.
testenv
bpfunit
Package bpfunit drives BPF programs through BPF_PROG_TEST_RUN for unit testing and microbenchmarking.
Package bpfunit drives BPF programs through BPF_PROG_TEST_RUN for unit testing and microbenchmarking.
bpfunit/fixtures
Package fixtures contains BPF programs used only by the test infrastructure.
Package fixtures contains BPF programs used only by the test infrastructure.
netns
Package netns provides Linux network namespace lifecycle helpers for tests.
Package netns provides Linux network namespace lifecycle helpers for tests.
scenario
Package scenario is a declarative builder for the Neutron snapshots that exercise neutron.BuildTrie in tests, hiding the struct-literal boilerplate while producing the same neutron.Snapshot production consumes.
Package scenario is a declarative builder for the Neutron snapshots that exercise neutron.BuildTrie in tests, hiding the struct-literal boilerplate while producing the same neutron.Snapshot production consumes.
traffic
Package traffic generates network traffic for testenv-based tests.
Package traffic generates network traffic for testenv-based tests.
Package tunables holds the agent's hot-reloadable operational knobs behind one atomic snapshot, swapped whole on each SIGHUP.
Package tunables holds the agent's hot-reloadable operational knobs behind one atomic snapshot, swapped whole on each SIGHUP.
Package unresolved implements the UnresolvedBuffer: the late-binding holding area for flows whose VM-side MAC is not yet in the metadata map.
Package unresolved implements the UnresolvedBuffer: the late-binding holding area for flows whose VM-side MAC is not yet in the metadata map.
Package wal is the agent's write-ahead log: an atomic JSON snapshot of state.GlobalState, flushed every 60s and read back on boot to seed state before the scraper starts.
Package wal is the agent's write-ahead log: an atomic JSON snapshot of state.GlobalState, flushed every 60s and read back on boot to seed state before the scraper starts.
Package zombie removes orphan TC telemetry filters left by a previous agent run that exited without unloading them.
Package zombie removes orphan TC telemetry filters left by a previous agent run that exited without unloading them.

Jump to

Keyboard shortcuts

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