Define netsender config through revid-cli
could we have netsender get config from either config file under etc, or through revid-cli. e.g. if no flags through revid-cli are defined then we get config from file, or if config is defined through revid-cli then we get params from there.
Comments (8)
-
-
-
reporter Well would it be a dependency if we have a choice to define config Params through file or revid-cli? Say we include the -NetSender flag, If we include no config Params then it expects to find them in file, but if we do provide config flags then it uses those. Isn't it the same sort of deal with how we use the -NetSender flag in the first place? I guess no big deal if we use a config file, I just found it annoying to go to the conf file to change stuff.
-
reporter And I'll check the PR asap
-
reporter Or alternatively could we define a flag for an alternative config dir to the default just in case we want a conf closer by during dev?
-
Yes, but even if there was a revid-cli flag to use an alternative config file, netsender would still need to know about the conf file, which would require API changes (probably to netsender.Init, which calls readConfig). In contrast, adding one or two lines to the standard netsender.conf is straightforward, and requires no API changes.
-
reporter I see, that makes sense
-
reporter - changed status to resolved
Concluded that this is not an appropriate method
- Log in to comment
NetSender should have no dependencies on any clients that use it. This is similar to the issue with logging that was successfully resolved.
In summary, Netsender should get all of its params from netsender.conf either directly by reading the conf file (as it does at startup), or indirectly as a result of calling /config.