mecha10_nodes_websocket_bridge/lib.rs
1//! WebSocket Bridge Node
2//!
3//! Forwards Redis pub/sub messages to WebSocket clients for dashboard and browser consumption.
4//! Supports two modes:
5//! - **Server mode** (default): Accepts local WebSocket connections
6//! - **Client mode**: Connects to a remote relay service for production deployments
7
8pub mod config;
9pub mod node;
10pub mod relay_client;
11
12pub use config::{RelayConfig, WebSocketBridgeConfig};
13pub use node::WebSocketBridgeNode;
14
15/// Run the WebSocket bridge node
16///
17/// This is the entry point used by the generated node registry.
18pub async fn run() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
19 let node = WebSocketBridgeNode::new().await?;
20 node.run().await?;
21 Ok(())
22}