add backend for history

This commit is contained in:
2024-12-30 20:13:03 -05:00
parent c7ca250b66
commit aa1763cbe7
11 changed files with 319 additions and 28 deletions

View File

@@ -11,6 +11,7 @@ use crate::telemetry::management_service::TelemetryManagementService;
use std::error::Error;
use std::sync::Arc;
use tokio_util::sync::CancellationToken;
use crate::telemetry::history::TelemetryHistoryService;
pub async fn setup() -> Result<(), Box<dyn Error>> {
let cancellation_token = CancellationToken::new();
@@ -22,7 +23,9 @@ pub async fn setup() -> Result<(), Box<dyn Error>> {
});
}
let tlm = Arc::new(TelemetryManagementService::new());
let tlm = Arc::new(TelemetryManagementService::new(
TelemetryHistoryService::new()
));
let grpc_server = grpc::setup(cancellation_token.clone(), tlm.clone())?;