NodeFormulaService class

Executes formula and preset operations on a node, against a FormulaRegistry. Supplies the formulaHandler / presetHandler an agent plugs into its config.

Constructors

NodeFormulaService({required FormulaRegistry registry, String agentVersion = omnyServerVersion, Clock clock = const SystemClock(), void onLog(String line)?})
Creates a node formula service.

Properties

agentVersion → String
The agent version (reported in the formula context platform).
final
clock → Clock
Time source.
final
hashCode → int
The hash code for this object.
no setterinherited
onLog → void Function(String line)?
Where a formula's output goes as it is produced.
final
registry → FormulaRegistry
The catalogue of formulas this node can run.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyPreset(PresetApply request) → Future<PresetApplyResult>
Applies a preset by running its steps in order; success requires every step to succeed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reportStatus(FormulaStatusRequest request) → Future<FormulaStatusResult>
Reports what each formula finds when it looks at itself.
runFormula(FormulaRun request) → Future<FormulaResult>
Runs a single formula action, returning its result.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

runTag(String formula, FormulaAction action) → String
The prefix every line of a run carries on the node log stream.

Constants

logLimit → const int
How many lines a single run keeps in its result.