summaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/config.rs
Commit message (Collapse)AuthorAgeFilesLines
* Ensure that all config sections have deny_unknown_fieldsNick Mathewson2021-11-251-0/+2
| | | | | When we deserialize a configuration, we should reject unknown variables (except when we have an explicit reason to allow them).
* Fix a few typos.Nick Mathewson2021-11-241-4/+4
| | | | Also fix some commonwealth spellings that had slipped in.
* Implement meta-builder pattern for TorClientConfigNick Mathewson2021-11-221-1/+1
| | | | | This should be ergonomic than having to construct every section of the configuration separately.
* Make every Config type implement Eq.Nick Mathewson2021-11-211-3/+3
| | | | | Doing this is necessary for reconfiguration support, and will help a lot with testing, too.
* For every* config type, make defaults consistent.Nick Mathewson2021-11-211-7/+28
| | | | | | | | | | This patch makes sure that for every* config type we have, the defaults you get from a Builder match those you get from Serde, and that both match the value that you get from arti_defaults.toml. Later down the line I'll be adding some tests to keep these in sync. * StorageConfig still has no defaults of its own, since we aren't so sure we want other applications to use Arti's directories by default.
* Give every ConfigBuilder a From<Config> implementation.Nick Mathewson2021-11-211-0/+22
| | | | This will make it more convenient to reconfigure things.
* Ensure that every section-level config type has a builder() function.Nick Mathewson2021-11-211-0/+18
|
* Flatten enforce_distance into path_rules.Nick Mathewson2021-11-181-6/+44
| | | | Also use the path_rules name consistently throughout the code.
* Fold "circuit_timing" and "request_timing" into a single section.Nick Mathewson2021-11-181-42/+20
|
* Move top-level configuration downwards from `arti` to `arti-config`.Nick Mathewson2021-11-181-4/+6
| | | | | | | | 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.
* Try writing a bit more documentation for configuration types.Nick Mathewson2021-10-281-3/+9
|
* Replace references to arti-client in the documentation.Nick Mathewson2021-10-211-1/+1
|
* tor-client: refactor TorClient::bootstrap's args into a config objecteta2021-10-191-1/+1
| | | | | | | | | | | | | The three arguments TorClient::bootstrap requires by way of configuration have been factored into a new TorClientConfig object. This object gains two associated functions: one which uses `tor_config`'s `CfgPath` machinery to generate sane defaults for the state and cache directories, and one that accepts said directories in order to create a config object with those inserted. (this commit was inspired by trying to use arti as a library and being somewhat overwhelmed by the amount of config stuff there was to do :p)
* Re-export configuration types from tor-client.Nick Mathewson2021-10-091-0/+4
|
* Do not use set_ prefix on derive_builder settersJani Monoses2021-09-161-4/+4
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+102
This will cause some pain for now, but now is really the best time to do this kind of thing.