NodeBlueprintService class

Plans and applies blueprints on a node.

Sibling to NodeFormulaService, and deliberately node-side: planning has to read the machine, and a plan assembled from what the Hub last heard is a plan assembled from intentions. The Hub resolves and sends; this reads, diffs, applies in order and writes the ledger.

Constructors

NodeBlueprintService({required ProviderRegistry providers, LedgerStore? ledgers, String agentVersion = omnyServerVersion, Clock clock = const SystemClock(), void onLog(String line)?})
Creates a blueprint 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
ledgers LedgerStore
Where the record of what it manages is kept.
final
onLog → void Function(String line)?
Where a resource's output goes as it is produced.
final
providers ProviderRegistry
What this node knows how to manage.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(BlueprintApplyRequest request) Future<BlueprintApplyResult>
Moves the node to what request declares.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
plan(BlueprintPlanRequest request) Future<BlueprintPlanResult>
Works out what applying request would change, without changing anything.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

runTag(ResourceId id) String
The prefix every line of a resource's work carries on the node log stream.

Constants

logLimit → const int
How many lines one resource keeps in its change.