Commit graph

7 commits

Author SHA1 Message Date
adrien f5ac36e21f WIP: rewrote runtime.rs using match to convey intent better 2021-09-22 14:46:57 +02:00
adrien beefcd7ade WIP: removed useless '.clone()' in runtime.rs and changed config test file name to config_test.rs 2021-09-22 14:46:37 +02:00
Quentin 900ba20fbe
Use the new formatting rules 2021-09-20 16:07:58 +02:00
Quentin 2e797d2f62
Local code formatting 2021-09-20 11:30:00 +02:00
adrien 76fe63791b Rewrote the configuration options to make Diplonat modular: IGD and Firewall modules will only be enabled if correponding DIPLONAT_*_ENABLE is set. (Breaking changes!)
Also rearranged imports throughout the project, because I couldn't resist, sorry.
2021-08-26 16:05:39 +02:00
LUXEY Adrien 644e707956 environment.rs successfully replaced with new config/ configuration loader. No API changes, more tests, cleaner code: life is swell. 2021-08-16 11:19:16 +02:00
LUXEY Adrien ae9550ce23 New configuration parsing using envy. Added minimal functionnality for
the future ACME parameters. Tests written and passing.

WIP: added envy dependncy and ConfigOpts structs that will constitute Diplonat's configuration

WIP: ConfigOpts from_env() and validate() methods written. No API change (the env names remain unchanged)! Now need to use our new ConfigOpts struct instead of Environment, and update references to the environment variables in the code.

WIP: RuntimeConfig with business logic done. Tests written, but they are all running from the same process - setting environment variables in each test produces incoherent results. Another solution for testing is needed.

WIP: tests are fully written using 'from_iter' and all passing
2021-08-16 10:26:06 +02:00