OpenSDN source code
|
#include <feature_flags.h>
Public Member Functions | |
void | Set (const std::string &name, const std::string &version_info, bool enabled, FlagState::Type state, ContextVec &context_infos) |
void | Unset (const std::string &name) |
Static Public Member Functions | |
static FlagConfigManager * | GetInstance () |
static void | Initialize (const string &build_info) |
Private Member Functions | |
FlagConfigManager (FlagManager *manager) | |
DISALLOW_COPY_AND_ASSIGN (FlagConfigManager) | |
Private Attributes | |
FlagManager * | flag_manager_ |
Static Private Attributes | |
static boost::scoped_ptr < FlagConfigManager > | instance_ |
static std::string | version_ |
User configuration for feature flag is provided to the FlagManager using this class. Used by servers providing config data (ifmap_server) Data provided includes
Definition at line 338 of file feature_flags.h.
|
private |
Definition at line 157 of file feature_flags.cc.
|
private |
|
static |
|
static |
Initialize should be called from modules (for instance from main)
Definition at line 164 of file feature_flags.cc.
void process::FlagConfigManager::Set | ( | const std::string & | name, |
const std::string & | version_info, | ||
bool | enabled, | ||
FlagState::Type | state, | ||
ContextVec & | context_infos | ||
) |
API to set/update user config. Called when run-time updates are received for feature.
Call FlagManager to add/update the configuration for this feature flag to its flag store if the version matches the module version. Otherwise ignore.
Definition at line 185 of file feature_flags.cc.
void process::FlagConfigManager::Unset | ( | const std::string & | name | ) |
API to unset user config. Called when user unconfigures feature flag.
User unconfigured the flag. Call FlagManager to remove the user configuration for this feature flag from its flag store.
Definition at line 204 of file feature_flags.cc.
|
private |
Definition at line 360 of file feature_flags.h.
|
staticprivate |
FlagConfigManager instance
Definition at line 359 of file feature_flags.h.
|
staticprivate |
Definition at line 362 of file feature_flags.h.