Define netsender config through revid-cli

Issue #10 resolved
Saxon Milton created an issue

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)

  1. Alan Noble

    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.

  2. Saxon Milton 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.

  3. Saxon Milton 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?

  4. Alan Noble

    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.

  5. Log in to comment