hypercall_api/
runtime_status.rs1#[derive(Clone, Debug)]
2pub struct StartupProgressSnapshot {
3 pub phase: String,
4 pub counter: u64,
5 pub last_progress_unix_ms: Option<u64>,
6 pub last_progress_age_ms: Option<u64>,
7}
8
9pub use hypercall_runtime_api::StandbyPromoteOutcome;
10
11pub trait StandbyReplayProgress: Send + Sync {
12 fn commands_replayed(&self) -> u64;
13 fn is_caught_up(&self) -> bool;
14 fn replay_cursor_seq(&self) -> Option<i64>;
15 fn latest_stream_seq(&self) -> Option<u64>;
16 fn stream_lag(&self) -> Option<u64>;
17 fn last_replayed_seq(&self) -> Option<i64>;
18 fn last_replay_unix_ms(&self) -> Option<u64>;
19}
20
21pub trait StartupProgressReader: Send + Sync {
22 fn snapshot(&self) -> StartupProgressSnapshot;
23}
24
25pub trait ReadinessGate: Send + Sync {
26 fn reports(&self) -> Vec<crate::models::ReadinessComponentReport>;
27 fn all_ready(&self) -> bool;
28}
29
30pub use hypercall_runtime_api::StandbyPromoter;