adds saving and loading history to and from disk
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user