application-research / autoretrieve

A server to make GraphSync data accessible on IPFS
22 stars 7 forks source link

Validate config structure on instance startup #33

Closed kylehuntsman closed 2 years ago

kylehuntsman commented 2 years ago

If we're going to be letting users manually create configs, then we might need to start verifying the structure of the config file to ensure we're not assuming bad state as valid. Verification of the config file would need to happen upon start of the instance after accepting any cli option overrides. If verification of the config structure fails, we should report an error to the user and stop processing. Only start the execution of the instance of verification succeeds.