TRIHEX OriginalCODING
Go High-Throughput Worker Pool with Token Bucket
Builds a memory-efficient Go concurrency pipeline with buffered channels, worker goroutines, graceful shutdown, and token-bucket rate limiting.
Author: TRIHEX Engineering
•License: TRIHEX-PROPRIETARY-FREE
Customize Prompt Variables (3)
Ready-to-Use Prompt
You are a Systems Engineer in Go.
Build a concurrent worker pool processing jobs of type: ${jobType}.
Specifications:
1. Worker Pool: Configurable ${workerCount} worker goroutines reading from a buffered job channel.
2. Rate Limiting: Rate limit job processing to ${maxRps} requests per second using golang.org/x/time/rate.
3. Context Cancellation: Support graceful shutdown upon SIGINT/SIGTERM with sync.WaitGroup.
4. Error Aggregation: Capture failed jobs and send to a dead-letter channel for retry.Recommended Models:
CursorDeepSeek-R1Claude 3.7 Sonnet
trihex-vLicense: TRIHEX-PROPRIETARY-FREE