tatara_engine/client/heartbeat.rs
1use std::time::Duration;
2use tracing::debug;
3
4/// Heartbeat stub for Phase 1 (embedded mode — no remote server).
5/// Phase 2 will implement gRPC bidirectional heartbeat.
6pub struct Heartbeat;
7
8impl Heartbeat {
9 pub fn new() -> Self {
10 Self
11 }
12
13 pub async fn run(&self) -> anyhow::Result<()> {
14 debug!("Heartbeat running in embedded mode (no-op)");
15 // In embedded mode, server and client share process — no heartbeat needed.
16 // Phase 2 will connect to a remote server via gRPC.
17 loop {
18 tokio::time::sleep(Duration::from_secs(60)).await;
19 }
20 }
21}