Go On!
summary
Minimal Go code implements an HTTP-to-processor microservice with three parts: HTTP server, collector, processor. Starts with a blocking naive collector, then adds goroutines and channels to dispatch events to worker buffers so sends never block. Demonstrates workers=2 queue=1000 and a fake processor with random sleep up to 200ms; switches from batch size 2 to batch size 5 and adds a 200ms timeout flush. Code runs live, batches flush by size or timeout and is on GitHub.
AI-written summary · about
