pub struct CellRecord {
pub id: String,
pub spec_id: String,
pub run_id: Option<String>,
pub state: CellState,
pub status: String,
pub formation_id: Option<Uuid>,
pub started_at: Option<String>,
pub destroyed_at: Option<String>,
pub outcome: Option<String>,
pub exit_code: Option<i32>,
}Expand description
Projected view of an execution cell.
Fields are populated as cell events arrive from JetStream
(cell.lifecycle.v1.started, cell.command.v1.completed,
cell.lifecycle.v1.destroyed). The authoritative cell state lives
in the event log; this struct is a query-latency cache rebuilt on
every server restart by jetstream::replay_projection.
status is kept as a duplicated lowercase view of state so pre-
ARCH-001 clients (and the JSON response shape) continue to see a
single human-readable label without a breaking API change.
formation_id is reserved for future correlation: today the
supervisor’s CloudEvents do not carry a formationId field on the
Correlation block (see cellos-core::Correlation), so this stays
None for supervisor-emitted cells until that gap is closed
upstream. The field is preserved so the wire shape doesn’t churn
when correlation lands.
Fields§
§id: Stringdata.cellId from the supervisor’s cell events (the projection key).
spec_id: Stringdata.specId from the lifecycle events — the execution-cell-spec id
the operator declared (e.g. "e2e-stub-echo").
run_id: Option<String>Optional supervisor run id (data.runId); not always populated on
the started event so we accept None.
state: CellStateTyped lifecycle state.
status: StringLowercase mirror of state for legacy/string consumers.
formation_id: Option<Uuid>Reserved for formation correlation once the supervisor emits a
formationId on Correlation. Today the field stays None for
supervisor-emitted cells.
started_at: Option<String>CloudEvent time of the cell.lifecycle.v1.started event
(RFC3339). None until the started event has arrived.
destroyed_at: Option<String>CloudEvent time of the cell.lifecycle.v1.destroyed event
(RFC3339). None until the destroyed event has arrived.
outcome: Option<String>data.outcome from the destroyed event (e.g. "succeeded",
"failed").
exit_code: Option<i32>data.exitCode from the cell.command.v1.completed event when
the supervisor read an authenticated exit code. Omitted on forced
terminations (see cellos-core::LifecycleTerminalState).
Trait Implementations§
Source§impl Clone for CellRecord
impl Clone for CellRecord
Source§fn clone(&self) -> CellRecord
fn clone(&self) -> CellRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more