Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line options for service #20

Open
3 tasks
frankhorv opened this issue May 5, 2022 · 0 comments
Open
3 tasks

Command line options for service #20

frankhorv opened this issue May 5, 2022 · 0 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@frankhorv
Copy link
Collaborator

frankhorv commented May 5, 2022

The service must be able to run even without any argument provided at the command line (the default behavior).
The CLI part of the service needs to be implemented in a separate folder and appropriate modules...please see the snmp-sim-cli implementation for inspiration.
The main.rs should be extended by one function call to parse and handle the arguments, and that function should return a result to tell whether to run the default service functionality.-

  • All config will be in YAML file, so maybe all we need on the is a “help” message that tells the user about the YAML file (i.e. where it lives)
  • Option to generate a default config file =>
    • generate the base.yaml and write it to the destination folder (mandatory parameter)
    • don't overwrite the base.yaml by default => abort with error, if the file exists
    • add y argument to overwrite the base.yaml, if exists
  • Man page generation using clap_mangen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants