adds saving and loading history to and from disk

This commit is contained in:
2025-01-01 10:08:50 -05:00
parent dfd524ba19
commit 9136c5fd71
15 changed files with 602 additions and 146 deletions

View File

@@ -6,19 +6,18 @@ use crate::http::api::setup_api;
use crate::http::websocket::setup_websocket;
use crate::telemetry::management_service::TelemetryManagementService;
use actix_web::{web, App, HttpServer};
use log::trace;
use std::error::Error;
use log::info;
use std::sync::Arc;
use tokio_util::sync::CancellationToken;
pub async fn setup(
cancellation_token: CancellationToken,
telemetry_definitions: Arc<TelemetryManagementService>,
) -> Result<(), Box<dyn Error>> {
) -> anyhow::Result<()> {
let data = web::Data::new(telemetry_definitions);
let cancel_token = web::Data::new(cancellation_token);
trace!("Starting HTTP Server");
info!("Starting HTTP Server");
HttpServer::new(move || {
App::new()
.app_data(data.clone())