L8Utils provides the shared building blocks used across all Layer 8 services. High-performance cache, priority queues, async logging, thread-safe maps, type registry, notifications, and a centralized resource container. All components are interface-driven and thread-safe.
In-memory cache with optional storage persistence. Supports CRUD, paginated queries with 30-second TTL, clone-based isolation, statistics tracking, and collection operations.
Post, Get, Put, Patch, Delete with optional notificationTwo queue implementations optimized for different workloads.
Async, queue-based logging framework with a 50,000-entry buffer. Supports file output with configurable directory, console output, or both. Five log levels: Trace, Debug, Info, Warning, Error. Includes pprof integration for CPU and heap profiling. Direct (synchronous) logger also available.
Distributed state change notification system. Supports Add, Delete, Update, Replace, and Sync types plus TSDB notifications for time-series data. Property-level change granularity with sequence numbering and service-area routing.
Type registration and dynamic instance creation. Enum registration and management. Layer 8 core types pre-registered. Thread-safe operations via sync.RWMutex.
go/utils/cache/go/utils/queues/go/utils/logger/go/utils/notify/go/utils/registry/go/utils/resources/go/utils/maps/go/utils/workers/l8typessync.RWMutex, sync.Cond, or sync.Map throughout