This server application provides a solution for managing and broadcasting configuration updates in real-time. It uses Server-Sent Events (SSE) to enable clients to listen for updates to configurations across different environments.
- Real-time configuration updates using SSE.
- Endpoints for fetching current configurations, updating configurations, and accessing configuration history.
- Logging with both console and JSON outputs for effective monitoring.
- Rust programming language.
- Actix and Actix-Web for the web server and actor model concurrency.
- Tokio for asynchronous runtime.
- Slog for flexible logging.
- Rust and Cargo installed on your system.
- Basic knowledge of Rust and asynchronous programming.
- Clone the repository to your local machine.
- Navigate to the project directory.
- Run
cargo run
to start the server. - The server will start listening on
127.0.0.1:8080
.
GET /sse/{environment}
: Subscribe to real-time updates for a specific environment.GET /config/{env}
: Fetch the current configuration for a specific environment.POST /config
: Update the configuration for a specific environment.GET /config/history/{env}
: Get the configuration update history for a specific environment.GET /config/version/{env}/{version}
: Fetch a specific version of the configuration for an environment.
Configure logging and other settings by editing the config.rs
and logger.rs
modules as needed.
This project is licensed under the MIT License - see the LICENSE.md file for details.