ProxyManager
Each bot runs an independentpollLoop goroutine. Dual-mode per bot:
- Proxy mode: forwards raw updates to backend URL
- Management mode: processes updates for chat/message tracking
UpdateQueue
In-memory ring buffer (1000 updates per bot) with waiter notification pattern. Multiple consumers can poll simultaneously.Bot Resolution
API endpoints resolve bots through a fallback chain:- Check registered bots map
- Check ProxyManager’s managed bots