Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update falco main to use falco application + cmdline_opts
Update falco's main falco_init() to use a falco::app::application and falco::app::cmdline_opts object instead of storing all its command line state in stack variables. The bulk of the removed code is in usage() (not needed as cxxopt's help() is self-documenting.) and getopt_long() which is replaced by app.init(argc, argv). For the most part, this is simply replacing references to local variables (e.g. "all_events") to the bound variable inside the cmdline_opts object (e.g. app.copts().all_events). There are a few cases where more complex logic was used (output formats, initializing k8s/mesos with string pointers), and those changes are still in falco_init(). For the most part, the monolithic parts of falco_init that involve reading config files, creating the inspector, loading rules, etc are still present. Those will be addressed in later changes. Signed-off-by: Mark Stemm <[email protected]>
- Loading branch information