| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
A placeholder may be written $(env:NAME), $(file:PATH) or $(cmd:COMMAND),
ending at the parenthesis matching its own: the same as with braces,
nesting and all. A configuration written in Nix, or passed through a
systemd unit, needs no escapes so.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What reads a configuration moves to the crate config, as it was, so
that other programs read theirs alike:
* option: Kind, OptionSpec, and Schema: a program's options, those
that can't be combined, and those that are gone;
* file: TOML and JSON files, their includes and unsets;
* arguments: the options as arguments, --config and --unset, and files
and arguments put together (merged);
* layer: values and where they came from, a later source over the
earlier ones (overlay), what a value was made of (Sources);
* units: durations and sizes as operators write them, which continuum
keeps under crate::units.
Each takes the schema it reads by, where continuum's code went by its
own tables: the node's is config::SCHEMA, a party's client's
config::PARTY. Whether a value is shown goes by the schema read by, so
an option of the node is no secret for being one of the client's.
continuum keeps its options, the settings they make, their checks and
the report; its tests of files and layers stay, by the node's options,
and the crate has one by a schema of its own.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file+raw:, cmd+raw: and env+raw:, and format = "raw" in a table, give
what is there byte for byte (Imported::Raw): no line break removed at
its end, and what is no text taken, as a key or a certificate needs.
Text and JSON still must be UTF-8, and say +raw where they aren't.
A placeholder gives text; in a +raw importer one may be +raw too, and
its bytes go in as they are, into a name, a path, an argument or a
shell's positional parameter. Into text none does: not into a text or
JSON importer, nor into text with placeholders.
continuum takes a +raw value as one text, read as nothing else; one
that is no UTF-8 it refuses, an option being text.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A name, a path, a command and each argument of an importer may hold
placeholders of their own. There only ${env:, ${file: and ${cmd: begin
one, $${ is a ${, and every other $ stays: a command's are its shell's.
What a placeholder gives is never run. Into a name, a path and an
argument it goes as text, an argument staying one. A shell command gets
it as a positional parameter, the placeholder becoming a reference to
it, "${1}", or ${1} inside double quotes: no part of the script,
whatever it holds. import::Shell tells where in a script a place is,
as far as that reference needs; where it can't be written as one word
(single quotes, backquotes, $((…)), the shell's ${…}, after a backslash
or a here-document), the command is refused. What it gets wrong can
refuse a reference or have the shell split it, never run it.
An importer has its directory itself (Importer::dir), a file's path
joined with it when read, so that a path may hold placeholders.
|
|
|
Importers and placeholders (env:, file:, cmd:, ${…}, +json, $$, the
tables) move from config::import to the crate config, crates/config, as
its module import, as they were, public: the crate is for what a
program's configuration is made of, from its files and its arguments,
and other programs make theirs with it.
The repository is a workspace of the node and that crate, both default
members, so that cargo quick, cargo sim and clippy take in both.
|