A high-performance, modular Go library implementing production-grade distributed systems patterns, concurrency primitives, caching strategies, and resiliency components.
workerpool: Type-safe generic worker pool with dynamic autoscaling, worker metrics, and graceful drain.pipeline: Composable multi-stage stream processing pipelines with fan-in and fan-out support.ratelimit: Lock-free token bucket and leaky bucket rate limiters.
circuitbreaker: Configurable 3-state (Closed, Open, HalfOpen) circuit breaker with rolling failure windows.retry: Exponential backoff retry engine with full jitter, decorrelated jitter, and custom error classifiers.bulkhead: Concurrency isolation bulkhead to prevent cascading service degradation.
lru: Thread-safe generic LRU cache with eviction hooks.lfu: O(1) frequency-indexed LFU cache with least-frequent eviction.multitier: Two-tier (L1 Memory + L2 Distributed) caching layer with singleflight dogpile prevention.
eventbus: In-memory async event broker with wildcards and buffered subscriber queues.outbox: Transactional outbox engine ensuring at-least-once message delivery.
ringbuffer: High-throughput circular ring buffer.trie: Fast Radix Trie for hierarchical routing and prefix matching.
metrics: Lock-free metrics registry tracking Counters, Gauges, and Histograms (P50, P90, P99).tracer: Lightweight distributed trace context propagator adhering to W3C TraceContext standards.
Run all unit tests and benchmarks:
go test -v -race ./...
go test -bench=. -benchmem ./...MIT License. Crafted with clean architecture and production rigor.