ResilienceData class
Compose multiple HRV / sleep sources into one ResilienceInput.
Default sources cover the multi-provider case for vendor sleep:
BaselinesNightlyHrvSource (the in-memory ring) plus a
CanonicalEventStoreHrvSource per supported provider that
queries the canonical event store directly. The per-provider
sources catch HRV the Baselines lockstep missed (e.g. a Whoop
recovery event that landed before its matching sleep night was
ingested). The engine's dominant_kind filter handles de-dup
at compute time.
Hosts with raw RR (Polar H10 sessions) or 5-minute epoch HRV (HealthKit) can append additional sources; the composer just concatenates and the engine routes by kind.
Sources are queried in parallel; per-source failures degrade to empty lists rather than aborting the snapshot — partial data is strictly better than no data for the resilience engine.
Constructors
-
ResilienceData({Iterable<
HrvSampleSource> hrvSources = _defaultHrvSources, Iterable<SleepWindowSource> sleepSources = const [BaselinesSleepWindowSource()], ResilienceConfig config = const ResilienceConfig()})
Properties
- config → ResilienceConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
snapshot(
{Duration? window}) → Future< ResilienceInput> - Pull samples + windows over the configured lookback and return a ResilienceInput ready to feed to SynheartResilience.compute.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited