int parse_config_files(ConfigValues& values, const ConfigTracker& tracker,
const char *conf_files,
std::ostream *warnings, int flags);
-
+ int parse_buffer(ConfigValues& values, const ConfigTracker& tracker,
+ const char* buf, size_t len,
+ std::ostream *warnings);
+ void update_legacy_vals(ConfigValues& values);
// Absorb config settings from the environment
void parse_env(unsigned entity_type,
ConfigValues& values, const ConfigTracker& tracker,
void get_all_keys(std::vector<std::string> *keys) const;
// Return a list of all the sections that the current entity is a member of.
- void get_my_sections(const ConfigValues& values,
- std::vector <std::string> §ions) const;
+ std::vector<std::string> get_my_sections(const ConfigValues& values) const;
// Return a list of all sections
int get_all_sections(std::vector <std::string> §ions) const;
void _show_config(const ConfigValues& values,
std::ostream *out, ceph::Formatter *f) const;
- void _get_my_sections(const ConfigValues& values,
- std::vector<std::string> §ions) const;
-
int _get_val_from_conf_file(const std::vector<std::string> §ions,
const std::string_view key, std::string &out) const;
void assign_member(member_ptr_t ptr, const Option::value_t &val);
- void update_legacy_vals(ConfigValues& values);
void update_legacy_val(ConfigValues& values,
const Option &opt,
member_ptr_t member);
// for those want to reexpand special meta, e.g, $pid
bool finalize_reexpand_meta(ConfigValues& values,
const ConfigTracker& tracker);
-private:
-
- /// expand all metavariables in config structure.
- void expand_all_meta();
+ std::list<std::string> get_conffile_paths(const ConfigValues& values,
+ const char *conf_files,
+ std::ostream *warnings,
+ int flags) const;
+private:
+ static std::string get_cluster_name(const char* conffile_path);
// The configuration file we read, or NULL if we haven't read one.
ConfFile cf;
public: