Skip to main content

ReadinessGate

Trait ReadinessGate 

Source
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§

Source

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.

Source

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.

Implementors§