aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-config/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a doc link.Nick Mathewson2022-02-041-1/+2
|
* arti-config: add blank lines between functions.Nick Mathewson2022-02-021-0/+6
|
* arti-config: Small type and comment refactoring from review.Nick Mathewson2022-02-021-2/+0
|
* Make configuration-watching configurable and off-by-default.Nick Mathewson2022-02-011-2/+3
| | | | | | | | I'm slightly concerned about whether this is behavior people would expect to have on-by-default, so let's make this off-by-default for now. Maybe the `application` and `system` sections should merge?
* Reload configuration when our configuration files change.Nick Mathewson2022-02-011-1/+4
| | | | Closes #270
* arti_config: Refactor configuration sources into a structNick Mathewson2022-02-011-26/+73
| | | | | | | | | | | | | | | | | | | This is by no means our final API, but should represent an improvement. Here instead of having to specify a list of files and their is-this-optional status, along with a list of command-line options, we have a single structure that encapsulates all of that information. Two advantages here: - Callers no longer have to remember what the boolean means. - We can "reload" more easily, by keeping the source object around. This change also implements the correct behavior for our default configuration file in `arti::main`: if the file is absent and the user doesn't list a config file, that's no problem. But if the user lists _that very same config file, we should insist that it be present.
* Tracing configuration for logfiles, per-target filtersNick Mathewson2022-01-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we could only configure one global tracing filter that applied to stdout and journald. There was no support for log files, either. This patch fixes both issues, by substantially revising the configuration format: There are now separate filters for each log file, for journald, and for the console log. Because we want to allow multiple logfiles, they have to go into an array in the configuration. The configuration logic has grown a bit complicated in its types, since the tracing_subscriber crate would prefer to have the complete structure of tracing Layers known statically. That's fine when you know how many you have, and which kinds there will be, but for the runtime-configuration case we need to mess around with `Box<dyn Layer ...>`. I also had to switch from tracing_subscriber's EnvFilter to its Targets filter. It seems "EnvFilter" can only be applied as a Layer in itself, and won't work as a Filter on an individual Layer. Closes #166. Closes #170.
* extend lints to include 'clippy::all'Daniel Eades2021-12-281-0/+1
|
* Merge branch 'config-updates-and-tests'Nick Mathewson2021-11-291-1/+2
|\
| * Implement builder patterns for ArtiConfig.Nick Mathewson2021-11-251-1/+2
| | | | | | | | | | | | | | | | This commit implements the "metabuilder" pattern and the "builder reconstruction" pattern for the ArtiConfig type. I'm not 100% that this will be necessary, but it will certainly help with testing.
* | add semicolons if nothing returnedDaniel Eades2021-11-251-0/+1
|/
* Resolve a pair of rustdoc warnings.Nick Mathewson2021-11-241-1/+3
|
* Rename .gitignore APP_FOO to ARTI_FOO.Nick Mathewson2021-11-211-1/+1
| | | | | | | | Since these shell-variables are hardwired to use org.torproject.Arti as the program name, it isn't appropriate to call them "app-specific". If we someday reinstate APP_FOO, it should be based on a user-provided application name.
* Lower StorageConfig to arti-client crateNick Mathewson2021-11-211-1/+1
|
* Move the socks_port option into a new proxy section.Nick Mathewson2021-11-181-1/+1
| | | | Now there are no options that aren't in a toml section.
* Move top-level configuration downwards from `arti` to `arti-config`.Nick Mathewson2021-11-181-0/+162
To do this at all neatly, I had to split out `tor-config` from `arti-config` again, and putting the lower level stuff (paths, builder errors) into tor-config. I also changed our use of derive_builder to always use a common error type, to avoid error type proliferation.