class

Fluxion::Registry::Store

Inherits Reference < Object

Reads a synced mirror and installs configurations out of it.

Constants

MAX_PROFILE_BYTES = (8_i64 * 1024) * 1024

A profile is a hand-written file. Anything larger is either a mistake or an attempt to exhaust memory before parsing starts.

Constructors

new(source : Source)
Source

Instance methods

drift(entry : Entry) : Drift

How an installed copy compares to the registry.

The record of what was installed is kept beside the file, so a local edit is distinguishable from an upstream change. Without it the two look identical — the bytes differ — and sync could not tell the user which of their changes it was about to discard.

Source
install(entry : Entry, force : Bool = false) : String

Installs an entry, validating it first.

A registry describes what to install on a machine, so a profile that cannot even be parsed is refused here rather than at the first apply. Nothing is ever applied as a side effect of installing.

Source
installed?(entry : Entry) : Bool
Source
installed_ids

Every id currently installed from this registry.

Source
installed_path(entry : Entry) : String

Where an installed entry lives.

Source
manifest

The registry's manifest, with any diagnostics it produced.

Source
manifest!

The manifest, raising if it is unusable. For commands that cannot proceed without it.

Source
source
Source
source_path(entry : Entry) : String

Where an entry's profile sits inside the mirror.

Re-checks confinement against the resolved path rather than trusting the manifest's own validation: a symlink inside the repository could otherwise point anywhere, and the manifest cannot see that.

Source
stage(entry : Entry) : Nil

Copies an installed file back into the mirror, ready to publish.

Source
uninstall(entry : Entry) : Bool

Removes an installed entry.

Source

Nested types