Skip to main content

Module store

Module store 

Source
Expand description

The job history: a SQLite database of jobs, their runners, steps, samples and logs, the events clients resume from, cache sizes, the paused repositories and where the notifier got to. Owns the schema and its migrations, the one writer and the event broadcast. Writes are messages to a writer thread, so the engine never waits on the disk; reads and pruning run on Tokio’s blocking pool, pruning on its own connection, a batch at a time. It decides nothing about scheduling and stores no secret: no token, no JIT config, no runner _diag log.

Structs§

Announced
The profiles and repositories as the stored events last announced them: what clients resuming after those events have.
AutoSizing
Auto sizing as the history keeps it: when each profile last changed, and changes not yet known to be written.
LogPosition
Where a job’s log capture continues: the runner’s page file and the byte offset in it.
Measured
The last measurement of the cache volumes.
MirrorPosition
How far the mirror’s log was counted: the time of the last response counted, in nanoseconds since the epoch as Docker logs it, and how many responses logged at exactly that time were counted, so the next read counts the ones it was too early to see.
OpenJob
A job the history has not closed, as the engine needs it after a restart.
RunnerRecord
A runner container as the history records it.
SampleRecord
One sample of one runner’s container.
Store
The job history. Cloning shares it.

Enums§

Resolution
What became of a pending auto sizing change.
StoreError
Why the database cannot be used.

Functions§

sizing_at
What sizing reads from the database at path, opened read-only and not migrated, as runnerd doctor reads it while no daemon runs; None when there is no database yet. In a directory it may write, SQLite keeps the -wal and -shm files a read of a WAL database needs next to it; in one it may not, it reads the file as it is, or refuses when the -wal holds changes the file does not have yet.