1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Module: api::ready
//!
//! Responsibility: public readiness facade for endpoint callers.
//! Does not own: bootstrap state mutation or readiness barrier internals.
//! Boundary: exposes read-only readiness and bootstrap status snapshots.
use crate::{
dto::state::BootstrapStatusResponse,
ops::runtime::{bootstrap::BootstrapStatusOps, ready::ReadyOps},
};
///
/// ReadyApi
///
/// Thin endpoint-facing facade for readiness checks.
///
pub struct ReadyApi;
impl ReadyApi {
/// Mark a synchronous built-in lifecycle adapter ready after all invariants commit.
pub fn mark_ready() {
ReadyOps::mark_ready();
}
/// Return whether Canic runtime invariants have completed restoration.
#[must_use]
pub fn is_ready() -> bool {
ReadyOps::is_ready()
}
/// Return the current bootstrap readiness snapshot.
#[must_use]
pub fn bootstrap_status() -> BootstrapStatusResponse {
BootstrapStatusOps::snapshot()
}
}