summaryrefslogtreecommitdiff
path: root/src/mongo/util/options_parser/options_parser.h
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2018-04-03 10:29:48 -0400
committerHenrik Edin <henrik.edin@mongodb.com>2018-04-10 10:41:36 -0400
commitcb2b7de230a656986553e99f4a9f3a64f6be8a1e (patch)
treecf185762899c6c513aa66eb814fa5688b6cdac82 /src/mongo/util/options_parser/options_parser.h
parentfb9aed12d2ab29884f2567ae9e60e021790823bd (diff)
downloadmongo-cb2b7de230a656986553e99f4a9f3a64f6be8a1e.tar.gz
SERVER-32487 Embedded CAPI takes a yaml config string instead of argc and argv.
Diffstat (limited to 'src/mongo/util/options_parser/options_parser.h')
-rw-r--r--src/mongo/util/options_parser/options_parser.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/util/options_parser/options_parser.h b/src/mongo/util/options_parser/options_parser.h
index 26954debb59..a5beab53d97 100644
--- a/src/mongo/util/options_parser/options_parser.h
+++ b/src/mongo/util/options_parser/options_parser.h
@@ -110,6 +110,15 @@ public:
const std::map<std::string, std::string>& env,
Environment*);
+ /** Handles parsing of a YAML or INI formatted string. The
+ * OptionSection be a description of the allowed options. This function populates the
+ * given Environment with the results but does not call validate on the Environment.
+ */
+ Status runConfigFile(const OptionSection&,
+ const std::string& config,
+ const std::map<std::string, std::string>& env,
+ Environment*);
+
private:
/** Handles parsing of the command line and adds the results to the given Environment */
Status parseCommandLine(const OptionSection&,
@@ -120,6 +129,10 @@ private:
* */
Status parseINIConfigFile(const OptionSection&, const std::string& config, Environment*);
+ /** Handles parsing of either YAML or INI config and adds the results to the given Environment
+ */
+ Status parseConfigFile(const OptionSection&, const std::string& argv, Environment*);
+
/** Gets defaults from the OptionSection and adds them to the given Environment */
Status addDefaultValues(const OptionSection&, Environment*);