ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Composition.Plan

Description

The boot's config-decidable tier: one pure pass from the loaded configuration to every decision a role settles without touching its environment again, plus the ordered lines that report them. The boot logs those lines and the dry-run checker prints the same ones, so every refusal here is one runCheckConfig reaches too.

Synopsis

The config-decidable tier

data BootInputs Source #

What the pure tier reads: the loaded configuration, the layers it came from, and the process facts a boot measured before any decision. Nothing past this is read from the environment again.

Constructors

BootInputs 

Fields

data BootReport Source #

What one role's pass reported. Every field comes back on the refusing path too, so a refusal naming a config key stays traceable and an advisory beside it is not lost with the plan.

data BootPlan Source #

What a boot resolves: the role it starts, the decisions that role applies, and the lines both entry points report in the order they hold here.

resolveBootPlan :: BootRole -> BootInputs -> BootReport Source #

Decide everything one role's boot settles from the configuration alone. ecluse check-config runs this whole tier, and a boot adds no pure refusal of its own past it.

roleRefusalWarnings :: BootRole -> BootInputs -> [Text] Source #

Every refusal a role other than own earns from this configuration, each named by the command that earns it. A checker picks no subcommand, so it reports these beside its own verdict.

Locating the configuration document

defaultConfigPath :: FilePath Source #

The shipped config-document path. A non-blank ECLUSE_CONFIG relocates it.

explicitConfigPath :: [(String, String)] -> Maybe FilePath Source #

The path a non-blank ECLUSE_CONFIG names, trimmed of surrounding whitespace. Nothing leaves defaultConfigPath standing, where an absent document is not a failure.

configDocumentPath :: [(String, String)] -> FilePath Source #

The config-document path this environment resolves to.