mirror of
https://github.com/oxynote/oxynote.git
synced 2026-10-18 11:29:20 +02:00
1.4 KiB
1.4 KiB
AGENTS.md
Outbound data-source connections and the built-in demo source. Go standards live in server/core/AGENTS.md.
The demo data source
Every organization is seeded, unconditionally, with a Prometheus data source
"Demo" at demo://engineering, and the welcome document whose charts query it.
demo/synthesises the metrics in-process.runner.ensurePreparedpicks it for exactly that URL; any otherdemo://isdemo.ErrUnknownSource. The type staysprometheus, so nothing downstream can tell.- One
demo.Clientlives ondatasource.Managerfor the whole process, because its registry walks cache replayed history; a runner is built per call. - The timeline is a pure function of the tick (fixed epoch, one-minute
tick, per-series seed), so history never rewrites and any window
backfills.
walk.checkpointcaches one value per day-long segment. - Queries run through the official
promqlengine over astorage.Queryablesynthesising only the requested window, at the query's step. registry.godeclares every metric family.Test_welcomeDocumentQueriesruns every query ininternal/document/files/available_metrics.jsonagainst it.
Processor tests
processor/ starts throwaway MariaDB and Postgres containers (gnomock) to
cover real connection, query and read-only-check paths; docker is a
unit-test dependency here, as in internal/db.