Expand description
Telegram messaging bridge โ long-polling getUpdates + REST send.
Lifecycle:
TelegramBridge::init_global(config, http)โ call once at startup.- The poll loop runs in a background tokio task (retries forever).
TelegramBridge::get()returns the singleton for HTTP handler use.bridge.send(msg)enqueues a message for the REST client.bridge.health()returns the current connection status.
Modulesยง
- poller ๐
- Telegram long-polling loop:
getUpdatesโ dispatch โ offset advance; outbound mpsc โ REST send. Plays the same role asdiscord::gateway::run_gateway_loop, but with no session/resume state โ long polling has no connection to lose beyond a single HTTP request, so this is a plain retry-forever loop around one HTTP GET. - rest
- Telegram Bot API REST client โ
getUpdateslong-polling plussendMessage/editMessageTextfor outbound delivery. - types
- Telegram Bot API wire types (getUpdates / sendMessage / editMessageText).
Structsยง
Staticsยง
- GLOBAL_
BRIDGE ๐