v0.38.0 lwconf updates for deployment
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
lwconf: sparse stages, every problem of a part, pastes read by form
This commit is contained in:
1 parent
15ea410a0a
commit
6a168212de
17 files changed
+376
-180
No files matched your search
+11
-4
@@ -278,10 +278,14 @@ answer `{"value": ...}` or `{"error", "path", "pipeline", "node", "key",
|
||||
- `schema()`: what `lw --schema` prints.
|
||||
- `preset(name, values, dirs)`: a preset's pipelines; `values` maps a key to
|
||||
a string, a list key to strings.
|
||||
- `parse(text, form, dirs)`: the pipelines of a form's pasted text.
|
||||
- `parse(text, form, dirs)`: `{pipelines, left_out}`, the pipelines of a
|
||||
form's pasted text and the names of what it held besides them: a file's
|
||||
settings, an environment's `LOGWISP_` variables no pipeline flag has. Text
|
||||
in another form's shape is refused naming that form.
|
||||
- `validate(pipelines)`: `{pipelines, problems}`, the pipelines settled
|
||||
(defaults, kinds, ids) and the first problem of each part (a value of the
|
||||
wrong kind too) as `{path, pipeline, node, key, text}`.
|
||||
(kinds, ids) and every problem of each part, each key's and the first rule
|
||||
between a table's keys (a value of the wrong kind too), as `{path,
|
||||
pipeline, node, key, text}`.
|
||||
- `emit(pipelines, form)`: the text of `command`, `environment` or `file`.
|
||||
- `edit(pipelines, op)`: `{pipelines, node}`, the node left chosen. `op` is
|
||||
`{op, pipeline, ...}`:
|
||||
@@ -298,7 +302,10 @@ answer `{"value": ...}` or `{"error", "path", "pipeline", "node", "key",
|
||||
`{role, id, index}`: `source` or `sink` by its id, `filters` by its index,
|
||||
or the flow stage `rate_limit`, `format` or `heartbeat`, which `set` turns
|
||||
on and `remove` off; `add` takes `source`, `sink`, or `filters` with the
|
||||
type `include` or `exclude`.
|
||||
type `include`, `exclude` or `""` for the default.
|
||||
- Stages and options hold the keys set, so the forms carry no default an
|
||||
edit did not set: a stage key's zero is unset, and an option's zero is
|
||||
unset where it takes the key's default.
|
||||
|
||||
## Resource Management
|
||||
|
||||
|
||||
+6
-5
@@ -80,7 +80,7 @@ pipelines have [their own flags](#pipelines):
|
||||
speaks HTTP: `auth.node_binding` only on the chain sources, and
|
||||
`auth.trusted_proxies` on both HTTP listeners, though only the `http`
|
||||
sink admits it
|
||||
- a flow stage: its keys, and `on`, the values that turn it on
|
||||
- a flow stage: its keys, a `summary`, and `on`, the values that turn it on
|
||||
- a preset key: its default and help, and the choices (`enum`) and `hint`
|
||||
of the option it sets
|
||||
- `forms`: `command`, `environment` and `file`, each with its hint
|
||||
@@ -419,10 +419,11 @@ lw -c dev.toml --logging.level=debug
|
||||
`lw --check` validates without running: it builds every pipeline and plugin as
|
||||
a start would (options, TLS files, credentials files, startup warnings), but
|
||||
binds no port, reads no stdin, and opens, reads or creates no log file; it
|
||||
prints `configuration ok: N pipeline(s)` and exits 0. Otherwise it prints the
|
||||
first problem of each setting, flow stage, source, sink and pipeline, a line
|
||||
each named by its key's path, or else the first file that fails to open, and
|
||||
exits 1 (2 when a named file is missing, see [Exit Codes](#exit-codes)):
|
||||
prints `configuration ok: N pipeline(s)` and exits 0. Otherwise it prints
|
||||
every key's problem of each setting, flow stage, source, sink and pipeline,
|
||||
and the first broken rule between a table's keys, a line each named by its
|
||||
key's path, or else the first file that fails to open, and exits 1 (2 when a
|
||||
named file is missing, see [Exit Codes](#exit-codes)):
|
||||
|
||||
```bash
|
||||
lw --check -c /etc/logwisp/logwisp.toml
|
||||
|
||||
@@ -192,8 +192,10 @@ and variables replace the file's whole, and an array-indexed path such as
|
||||
## Validation
|
||||
|
||||
The configuration is checked offline when it loads, at every reload and by
|
||||
`lw --check`. Each check reports the first problem of each table (the top
|
||||
level, `logging`, each flow stage, each source and sink) by its key's path:
|
||||
`lw --check`. Each check reports every key's problem and the first broken
|
||||
rule between a table's keys, in every table (the top level, `logging`, each
|
||||
flow stage, each source and sink), by its key's path, a list entry's by its
|
||||
index (`acl.allow[1]`):
|
||||
|
||||
```
|
||||
Error: Failed to load config: invalid configuration:
|
||||
|
||||
@@ -145,10 +145,10 @@ and credentials files and printing startup warnings, without binding a port
|
||||
or opening, reading or creating a log file; print
|
||||
.Dq configuration ok
|
||||
and exit 0.
|
||||
Otherwise print the first problem of each setting, flow stage, source, sink
|
||||
and pipeline, a line each named by its key's path, or else the first file
|
||||
that fails to open, and exit 1, or 2 when a named configuration file is
|
||||
missing
|
||||
Otherwise print every key's problem of each setting, flow stage, source,
|
||||
sink and pipeline, and the first broken rule between a table's keys, a line
|
||||
each named by its key's path, or else the first file that fails to open, and
|
||||
exit 1, or 2 when a named configuration file is missing
|
||||
.Pq see Sx EXIT STATUS .
|
||||
.It Fl \-dump
|
||||
Print the effective configuration, with the options, environment and
|
||||
|
||||
Reference in new issue
Block a user