FileSessionLeaseStore constructor

FileSessionLeaseStore({
  1. required ExecutionEnv env,
  2. DateTime now()?,
  3. Duration staleAfter = const Duration(seconds: 15),
})

Creates the store. now and staleAfter are injectable for tests; the heartbeat cadence lives with the owners (CLI ~4s on the inbox tick, app 5s timer) — the store only judges staleness.

Implementation

FileSessionLeaseStore({
  required ExecutionEnv env,
  DateTime Function()? now,
  this.staleAfter = const Duration(seconds: 15),
}) : _env = env,
     _now = now ?? DateTime.now;