Move config parsing to Radio
neriumrevolta opened this issue · 0 comments
Problem statement
The SDK's Config
continues to grow as new env variables are needed for any Radio. These config variables are not needed by ALL Radios so it doesn't make sense to define them in the SDK. Also, the SDK currently defines how the config variables are being read (by CLI args or by env vars), which is not ideal since this decision should be on the Radio level. One Radio might only use env vars, another only CLI args and a third one - both.
Expectation proposal
The SDK should define the config it needs, but be agnostic as to how it receives it. All direct interactions with clap
(for command line args) or env variables should be moved to the POI Radio (and hence should be defined in each future Radio). We can keep the current Config
structure in config.rs
but omit the Radio-specific variables that won't be needed for ALL Radios.
Additional context
This work would also involve changes in the POI Radio, but I don't think we need a separate Issue.