livery.toolroom.store._home¶
livery.toolroom.store._home ¶
The store's home: one directory per machine, shared by every checkout.
Under the home: store/, the strongroom store with the tools and
urls namespaces; tools/<name>@<version>/, the views of the tools'
trees a shell runs from; uv/ and npm/, the delegated kinds'
directories; locks/, one file per tool version, which a supply holds
so that one process at a time supplies that version. Nothing here
reads an environment variable: the caller passes the home, toolroom's
machinery its data directory, hse its own.
Reach for livery.toolroom.store.Home and its open_store.
Classes:
| Name | Description |
|---|---|
Home |
The store's directories under one root. |
Attributes:
| Name | Type | Description |
|---|---|---|
TOOLS |
The namespace of installed tools: |
|
URLS |
The namespace of URL-keyed downloads, the convention strongroom |
|
NAMESPACES |
The store's namespaces. |
TOOLS
module-attribute
¶
The namespace of installed tools: tools/<name>@<version> names the
extracted archive's tree; write-once, so a version never changes under
a checkout that pinned it. tools/index/<name> names the tree the
catalogue last read for the tool, so a sweep keeps the records, the
versions and the surfaces a read fetched.
URLS
module-attribute
¶
The namespace of URL-keyed downloads, the convention strongroom publishes; volatile.
NAMESPACES
module-attribute
¶
The store's namespaces. tools/<name>@<version> names the tree a
version runs from and moves by compare-and-swap when the record's
layout for the version changes; the deployment that produced the tree
is recorded beside the ref. The artifact never changes under a
version, since landing verifies its bytes.
Home
dataclass
¶
Home(root: Path)
The store's directories under one root.
Attributes:
| Name | Type | Description |
|---|---|---|
root |
Path
|
The home: |
Methods:
| Name | Description |
|---|---|
under |
The store's home under a runner's data directory, |
tool_dir |
The view of name at version. |
lock |
The file a supply of name at version holds while it works. |
open_store |
Open the home's strongroom store, creating it on first use. |
under
classmethod
¶
The store's home under a runner's data directory, toolroom in it.
tool_dir ¶
lock ¶
The file a supply of name at version holds while it works.
open_store ¶
open_store(*, sources: Iterable[Source] = (), offline: bool = False, progress: Progress = silent) -> Store
Open the home's strongroom store, creating it on first use.
A store that exists is opened with the same namespaces it was created with; a directory that holds another layout refuses as strongroom refuses it. Two processes creating the store at once both open it: a creation that loses the race falls through to open. sources are the tiers the store consults for an object it lacks, offline keeps it from every origin, and progress receives any source skips strongroom reports.