WorkflowWatcher class

Watches WORKFLOW.md for changes and re-parses the typed config when it changes.

On parse/validation failure the previous known-good values are kept and an error is included in the next reload payload so the scheduler can surface it via observability without crashing.

Constructors

WorkflowWatcher({required String workflowPath, required Logger logger, WorkflowLoader? loader, Duration debounce = const Duration(milliseconds: 200)})
Creates a watcher.

Properties

debounce Duration
Optional debounce window for noisy filesystem events.
final
hashCode int
The hash code for this object.
no setterinherited
lastKnownGoodConfig WorkflowConfig?
Most recent successfully loaded config, when available.
no setter
loader WorkflowLoader
Loader used to parse the file.
final
logger → Logger
Logger for status messages.
final
reloads Stream<WorkflowReload>
Stream of reload events. Subscribers receive the latest known-good values along with any captured error.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
workflowPath String
Path to the workflow file.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() Future<WorkflowReload>
Loads the workflow once and starts watching for changes.
stop() Future<void>
Cancels the watcher and releases resources.
toString() String
A string representation of this object.
inherited

Operators

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