Kiosk: schedule client (conditional GET + atomic cache) and engine

Adds api_client support for GET /licenses/{key}/schedule with If-None-Match
and target-payload parsing (version/type/daily/weekly + legacy blocks), an
atomic on-disk schedule cache, a pure schedule engine (half-open blocks,
midnight self-wrap for daily, Sunday->Monday spillover for weekly, invalid
blocks skipped with a warning), and a background ScheduleManager that loads
the cache offline and pulls on boot and every 5 minutes. Adds engine/cache
tests against the shared docs/fixtures, including 304, corrupt cache, and
offline cases.
This commit is contained in:
NeilClack
2026-09-29 10:34:40 -05:00
parent b93fb8d2df
commit 509c925480
12 changed files with 1160 additions and 2 deletions
+4
View File
@@ -27,6 +27,10 @@ std::string formatUtcToTimezone(time_t utc_time, const std::string& iana_code, c
// timezone is empty.
int currentLocalMinutes(const std::string& iana_code);
// Weekday right now in `iana_code`, 0=Monday .. 6=Sunday. Falls back to UTC when
// the timezone is empty.
int currentLocalWeekday(const std::string& iana_code);
// Gets current UTC timestamp as ISO string
std::string getUtcTimestampIso();