A Rust-based service that streams logs from Redis to connected clients via WebSocket.
- Rust toolchain (latest stable)
- Docker (for containerized deployment)
# Build the project
cargo build
# Run in development mode
cargo run
# Run tests
cargo test
The service is configured through environment variables:
# Redis connection
REDIS_URL=redis://default:password@redis:6379
# WebSocket server
WS_PORT=8080 # Port to listen on for WebSocket connections
Build and run using Docker:
# Build the image
docker build -t dcs-log-streamer .
# Run the container
docker run -d \
-p 8080:8080 \
-e REDIS_URL=redis://default:password@redis:6379 \
dcs-log-streamer
The log streamer:
- Connects to Redis and subscribes to log channels
- Listens for WebSocket connections from clients
- Forwards logs from Redis to connected clients in real-time
- Handles client disconnections and reconnections gracefully
This project is licensed under the WTFPL - Do What The Fuck You Want To Public License.