Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/holger

.nornir/storage-design.md

Storage — design

Class: design · Function: storage (used by serve, proxy, embed). The whole-system view is design.md.

Two storage floors

StorageEndpoint (server/lib/src/storage/mod.rs) names a location (znippy | rocksdb) and a path; repos reference it by name in their ron_in / ron_out.

file-rust — the writable Cargo sparse index

RustRepoFile (server/repository/file-rust/src/lib.rs) serves a real Cargo sparse registry out of a {ns}/{name}/{version} disk tree. RustRepoFile::new(name, base_dir, base_url); three handle_http2_request routes:

route body Content-Type
/{repo}/index/config.json {"dl":"{base_url}/{repo}/crates","api":null} application/json
/{repo}/index/{p1}/{p2}/{crate} NDJSON, one line per stored version text/plain
/crates/{crate}/{version}/download the exact stored .crate bytes application/octet-stream

Three facts that are load-bearing:

file-oci (server/repository/file-oci) is the writable OCI Distribution v2 backend (blob/manifest upload + get, digest verify) over a disk CAS. Both file-* are the only writable backends; put on any znippy-* backend errors.

Integrity & concurrency

Because writable file-backed repos live on a single ReadWriteOnce volume, the deployment is single-replica by design; scale-out needs RWX storage (not yet supported) — back up the PVC instead.