22 #ifndef _PLUGINS_MONGODB_MONGODB_CLIENT_CONFIG_H_ 23 #define _PLUGINS_MONGODB_MONGODB_CLIENT_CONFIG_H_ 25 #include <mongo/client/dbclient.h> 76 mongo::HostAndPort conn_hostport_;
77 std::vector<mongo::HostAndPort> replicaset_hostports_;
78 std::string replicaset_name_;
81 typedef struct _AuthInfo
83 _AuthInfo(std::string dbname, std::string username, std::string clearpwd)
85 this->dbname = dbname;
86 this->username = username;
87 this->clearpwd = clearpwd;
95 std::list<AuthInfo> auth_infos_;
bool is_enabled() const
Check if configuration is enabled.
ConnectionMode mode() const
Get client configuration mode.
std::string hostport() const
Get host and port of configuration.
Fawkes library namespace.
mongo::DBClientBase * create_client()
Create MongoDB client for this configuration.
MongoDBClientConfig(fawkes::Configuration *config, fawkes::Logger *logger, std::string cfgname, std::string prefix)
Constructor.
void log(fawkes::Logger *logger, const char *component, const char *indent)
Write client configuration information to log.
ConnectionMode
Connection mode enumeration.
Interface for configuration handling.