l8inventory
Distributed cache for parsed infrastructure data.
A high-performance, generic, and model-agnostic distributed inventory cache for collected and parsed data. Works with any data model through Protocol Buffers. Supports network devices, Kubernetes resources, and custom inventory types. Built on the Layer 8 distributed cache infrastructure with SQL-like query capabilities.
DistributedCache with queries, pagination, metadata functions, and primary key lookups.Upstream clients (REST API, Layer 8 services) send CRUD operations to the InventoryService. Data is stored in a local in-memory cache. When forwarding is configured, an Aggregator batches operations and sends them to a downstream persistence service (ORM).
All write operations support optional forwarding to a downstream persistence service. Notifications (replicated operations from other nodes) are not forwarded, preventing duplicate writes.
When activated with a linksId, the service creates an Aggregator that batches operations (5 elements per flush, 30-second interval) and forwards them to the persistence service resolved via targets.Links.Persist(linksId).
SQL-like queries via L8Query: select * from Device where status=1. Supports filtering, pagination, and custom metadata functions. Metadata functions are evaluated per element during queries to compute aggregated values (e.g., status counts).
AddMetadata function