Skip to content

Commit ef4e9a9

Browse files
committed
feat: implement heartbeat and event reporting in node daemon
1 parent 1569695 commit ef4e9a9

7 files changed

Lines changed: 719 additions & 3 deletions

File tree

crates/sandchest-node/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
fn main() -> Result<(), Box<dyn std::error::Error>> {
2-
// Node proto — server stubs (control plane connects to us)
2+
// Node proto — server stubs for Node service, client stubs for Control service
33
tonic_build::configure()
44
.build_server(true)
5-
.build_client(false)
5+
.build_client(true)
66
.compile_protos(
77
&["sandchest/node/v1/node.proto"],
88
&["../../packages/contract/proto"],

crates/sandchest-node/src/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ pub struct NodeConfig {
147147
pub grpc_port: u16,
148148
pub data_dir: String,
149149
pub kernel_path: String,
150+
pub control_plane_url: Option<String>,
150151
}
151152

152153
impl NodeConfig {
@@ -162,6 +163,7 @@ impl NodeConfig {
162163
.unwrap_or_else(|_| "/var/sandchest".to_string()),
163164
kernel_path: std::env::var("SANDCHEST_KERNEL_PATH")
164165
.unwrap_or_else(|_| "/var/sandchest/images/vmlinux-5.10".to_string()),
166+
control_plane_url: std::env::var("SANDCHEST_CONTROL_PLANE_URL").ok(),
165167
}
166168
}
167169

0 commit comments

Comments
 (0)