aboutsummaryrefslogtreecommitdiffstats
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
* config: the report of a configuration, and --print-configtv3 days4-1/+179
| | | | | | | | | | | The report moves to the crate, as it was (report::report, Reports, Values): each option of a schema with its value, by the settings in effect given as JSON by option name, and where it came from; imported values and secrets left out. And the argument a program prints it by (arguments::with_print_config, prints_config). continuum gives its settings and what it loaded to it; --print-config and GET /admin/config say what they said.
* config: read names the option whose value doesn't fittv3 days2-7/+93
| | | | | | | | | | | Where the values set make none of what layer::read reads them into, its error names the option and where it was set, which serde doesn't: the first that alone makes none, as continuum found it for its settings; or, where what is read needs more than one option, the first without which the others make one. continuum reads its settings by it, and a party's client's options are named alike.
* config: clap, serde, toml and tracing are features, none defaulttv3 days6-19/+48
| | | | | | | | | | | | | A program names what it uses of the crate: * clap: the command line (arguments); * serde: what the values set are read into (layer::read), and durations and sizes as fields (units::duration_option, …); * toml: configuration files in TOML; without it a .toml file is refused, saying so, and files are JSON; * tracing: what a source replaces of an earlier one's, logged. continuum names all four.
* config: files, arguments and layers, by a program's own optionstv3 days9-23/+1235
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* config: +raw imports the bytes as they aretv3 days1-39/+174
| | | | | | | | | | | | | | | 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.
* config: placeholders nest, what one gives going in as datatv3 days1-119/+637
| | | | | | | | | | | | | | | | | | | 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.
* config: what a configuration imports by, in a crate of its owntv3 days3-0/+498
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.