diff options
author | Colin Patrick McCabe <cmccabe@alumni.cmu.edu> | 2011-05-23 19:11:15 +0200 |
---|---|---|
committer | Colin Patrick McCabe <cmccabe@alumni.cmu.edu> | 2011-05-24 02:28:27 +0200 |
commit | 13aed89e48ae0f2b2c052cda01f500bee1128f5a (patch) | |
tree | 842da4ea2fbc0dbb54c0b44590fd32b25927cc00 /src/common/config.h | |
parent | Split common_init_daemonize from common_init_finish (diff) | |
download | ceph-13aed89e48ae0f2b2c052cda01f500bee1128f5a.tar.xz ceph-13aed89e48ae0f2b2c052cda01f500bee1128f5a.zip |
Add CephContext
A CephContext represents the context held by a single library user.
There can be multiple CephContexts in the same process.
For daemons and utility programs, there will be only one CephContext.
The CephContext contains the configuration, the dout object, and
anything else that you might want to pass to libcommon with every
function call.
Move some non-config things out of md_config_t and into CephContext.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Diffstat (limited to 'src/common/config.h')
-rw-r--r-- | src/common/config.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/common/config.h b/src/common/config.h index f25789f2218..56fc2cd5bba 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -40,10 +40,7 @@ extern const char *CEPH_CONF_FILE_DEFAULT; #define LOG_TO_STDERR_SOME 1 #define LOG_TO_STDERR_ALL 2 -template <typename T, typename U> -class DoutStreambuf; - -struct md_config_t { +class md_config_t { public: /* Maps configuration options to the observer listening for them. */ typedef std::multimap <std::string, md_config_obs_t*> obs_map_t; @@ -505,14 +502,8 @@ public: int bdev_fake_mb; int bdev_fake_max_mb; int rgw_log; - - DoutStreambuf <char, std::basic_string<char>::traits_type> *_doss; - std::ostream _dout; - md_config_obs_t *_prof_logger_conf_obs; }; -extern md_config_t g_conf; - typedef enum { OPT_INT, OPT_LONGLONG, OPT_STR, OPT_DOUBLE, OPT_FLOAT, OPT_BOOL, OPT_ADDR, OPT_U32, OPT_U64 |