storage

package
v0.1.197 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package storage holds cross-cutting policy over the local stores: the SQLite metadata DB (localdb) and the content-addressed artifact cache (cas). Everything here is local-only; nothing in this package touches the network or upload paths.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnforceBudget

func EnforceBudget(ctx context.Context, db *localdb.DB, store *cas.Store, budgetMB int) (evicted []string, err error)

EnforceBudget evicts cached sample artifacts until the CAS fits inside budgetMB. Candidates are unpinned samples that still have an artifact, evicted coldest-first: lowest hot_score, then least recently used (goal.md §11.2 HOT cache policy). Pinned samples are never evicted, even if the store stays over budget. Eviction removes only the artifact bytes (cas.Delete + has_artifact=0); sample metadata and receipts remain.

Types

This section is empty.

Directories

Path Synopsis
Package blob abstracts sample-artifact storage (goal.md §14.2, §15.4).
Package blob abstracts sample-artifact storage (goal.md §14.2, §15.4).
Package cas implements a content-addressed store on the local filesystem.
Package cas implements a content-addressed store on the local filesystem.
Package localdb is the local SQLite store behind the csx daemon and CLI ($CSX_HOME/csx.db).
Package localdb is the local SQLite store behind the csx daemon and CLI ($CSX_HOME/csx.db).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL