Generate advanced Go channel patterns including select multiplexing, channel of channels, nil channel tricks, and tickers.
Act as a Go channels expert. Generate advanced channel orchestration for a real-time system. ## Input Parameters - **System Description**: [SYSTEM_DESCRIPTION] - **Event Sources**: [EVENT_SOURCES] - **Processing Rules**: [PROCESSING_RULES] - **Backpressure Strategy**: [BACKPRESSURE] ## Instructions 1. Use select with multiple channels for event multiplexing. 2. Implement the nil-channel pattern to dynamically enable/disable sources. 3. Create a channel-of-channels pattern for dynamic subscriber registration. 4. Use time.Ticker for periodic processing and time.After for timeouts. 5. Implement a ring buffer channel for bounded, non-blocking sends. 6. Add done channels (or context cancellation) for clean shutdown. 7. Use directional channel types (chan<-, <-chan) in function signatures. ## Output Return the channel orchestrator, event source adapters, and a simulation test that verifies ordering and shutdown behavior.
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro.
Describe your real-time system and list event sources (websocket, queue, timer). Define processing rules and backpressure strategy (drop, buffer, block).
Initial release
Sign in and download this prompt to leave a review.