pub trait ReadinessGate: Send + Sync {
// Required methods
fn is_ready(&self) -> bool;
fn wait_ready(&self) -> Result<(), ReadinessError>;
}Expand description
Trait for readiness signaling.
pact-agent implements this as a provider (emits readiness). lattice-node-agent implements this as a consumer (waits for readiness).
Required Methods§
Sourcefn is_ready(&self) -> bool
fn is_ready(&self) -> bool
Check if the node is ready for allocations.
Returns true once all boot phases have completed and the
readiness signal has been emitted.
Sourcefn wait_ready(&self) -> Result<(), ReadinessError>
fn wait_ready(&self) -> Result<(), ReadinessError>
Wait until the node is ready.
Returns immediately if already ready. Blocks until readiness is signaled or an error occurs (e.g., boot failure).
Lattice requests received before readiness should be queued, not rejected.