Skip to content
1 min read · 271 words

Interface: LuaCell

Defined in: src/batteries/orchestration/cells/lua/index.ts:256

The type of the cell returned by createLuaCell. It is a PredicateEvaluator with one extra field, status(), for inspecting the enforcement guarantee.

Extends

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
idreadonlystringHow a node names this cell in evaluator. Cells merge by this id across construction and run.PredicateEvaluator.idsrc/batteries/orchestration/types.ts:1072

Methods

evaluate()

ts
evaluate(node: PlanNode, ctx: PredicateContext): Promise<PredicateVerdict>;

Defined in: src/batteries/orchestration/types.ts:1081

Decide the node's outcome. Called once per frame reaching the node.

Parameters

ParameterType
nodePlanNode
ctxPredicateContext

Returns

Promise<PredicateVerdict>

Inherited from

PredicateEvaluator.evaluate


load()

ts
load(): Promise<void>;

Defined in: src/batteries/orchestration/types.ts:1077

Acquire whatever the cell needs — typically an optional peer. Awaited at construction, so a missing peer fails at boot with a named error rather than part-way through a freeze.

Returns

Promise<void>

Inherited from

PredicateEvaluator.load


status()

ts
status(): LuaCellStatus;

Defined in: src/batteries/orchestration/cells/lua/index.ts:262

Returns the enforcement guarantee this instance is delivering. See LuaCellGuarantee. A cell that could not install a count hook or whose allocator cap probe failed reports watchdog-only here rather than claiming a full guarantee.

Returns

LuaCellStatus


validate()

ts
validate(node: PlanNode): Promise<void>;

Defined in: src/batteries/orchestration/types.ts:1079

Reject a predicate shape this cell cannot use. Called at freeze, so refusal precedes approval.

Parameters

ParameterType
nodePlanNode

Returns

Promise<void>

Inherited from

PredicateEvaluator.validate