updates telemetry to no longer use grpc

This commit is contained in:
2025-12-29 19:08:13 -05:00
parent f658b55586
commit 8d737e8f33
29 changed files with 911 additions and 514 deletions

View File

@@ -3,13 +3,16 @@ use actix_web::http::header::ContentType;
use actix_web::http::StatusCode;
use actix_web::HttpResponse;
use thiserror::Error;
use uuid::Uuid;
#[derive(Error, Debug)]
pub enum HttpServerResultError {
#[error("Telemetry Name Not Found: {tlm}")]
TlmNameNotFound { tlm: String },
#[error("Invalid Uuid: {uuid}")]
InvalidUuid { uuid: String },
#[error("Telemetry Uuid Not Found: {uuid}")]
TlmUuidNotFound { uuid: String },
TlmUuidNotFound { uuid: Uuid },
#[error("DateTime Parsing Error: {date_time}")]
InvalidDateTime { date_time: String },
#[error("Timed out")]
@@ -26,6 +29,7 @@ impl ResponseError for HttpServerResultError {
fn status_code(&self) -> StatusCode {
match self {
HttpServerResultError::TlmNameNotFound { .. } => StatusCode::NOT_FOUND,
HttpServerResultError::InvalidUuid { .. } => StatusCode::BAD_REQUEST,
HttpServerResultError::TlmUuidNotFound { .. } => StatusCode::NOT_FOUND,
HttpServerResultError::InvalidDateTime { .. } => StatusCode::BAD_REQUEST,
HttpServerResultError::Timeout => StatusCode::GATEWAY_TIMEOUT,