Initial boilerplate scaffold for continuum-proxy

This commit is contained in:
2026-08-28 16:25:26 +00:00
commit 2807b2b067
18 changed files with 1002 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
use serde::{Deserialize, Serialize};
/// Messages sent from this gateway up to `continuum-backend`'s `/ws/edge/v1` route.
#[derive(Debug, Clone, Serialize)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum ClientMessage {
Hello {
gateway_id: String,
farm_id: String,
token: String,
version: &'static str,
},
Heartbeat {
seq: u64,
},
Telemetry {
printer_id: String,
payload: serde_json::Value,
},
TaskResult {
task_id: String,
ok: bool,
error: Option<String>,
},
}
/// Messages received from `continuum-backend` over the same connection.
#[derive(Debug, Clone, Deserialize)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum ServerMessage {
HelloAck {
session_id: String,
},
HeartbeatAck {
seq: u64,
},
Task {
task_id: String,
kind: String,
payload: serde_json::Value,
},
}