Expand description
On-disk template catalog (CORE-107).
A template is a named, versioned sandbox base: a built rootfs plus a
default-config bundle, optionally paired with a pre-warmed boot-to-ready
snapshot (template.proto). The catalog persists metadata only — one
atomically-replaced JSON file per template name under
{data_dir}/template-catalog/ — while the artifacts live elsewhere and
are referenced, never copied: rootfs images in the converted-rootfs cache
(pinned through TemplateCatalog::rootfs_paths) and warm snapshots in
the SnapshotCatalog under the
TEMPLATE_LABEL reserved label.
Versioning model: Build installs the mutable draft slot; Publish
freezes the draft as an immutable version (newest published wins bare-name
resolution). Version strings are caller-chosen and opaque — “newest” means
publish order, never a semver comparison.
Structs§
- Publish
Outcome - Result of publishing: the frozen version plus any released artifacts.
- PutDraft
Outcome - Result of installing a draft: the stored entry plus any artifacts the displaced previous draft owned exclusively.
- Released
Artifacts - Snapshot ids released by a catalog mutation.
- Resolved
Template - A
name[:version]reference resolved against the catalog. - Template
Catalog - The on-disk template catalog: one atomically-replaced JSON per name.
- Template
Defaults Spec - Default configuration a template applies to sandboxes created from it.
- Template
Entry - One built template version, or the unpublished draft.
- Warm
Artifact - A pre-warmed boot-to-ready snapshot plus the geometry it requires.
Enums§
- Ready
Probe Spec - Readiness probe recorded in template defaults.
Constants§
- TEMPLATE_
LABEL - Reserved snapshot label marking a snapshot as owned by a catalog template.
Functions§
- compute_
digest - Deterministic content digest for a template entry (
sha256:<hex>). - validate_
template_ name - Validate a template name.
- validate_
template_ version - Validate a template version string (
[A-Za-z0-9._-], e.g. “1.2.0”).