![]() |
Fledge
An open source edge computing platform for industrial users
|
The storage service must handle its own configuration differently to other services as it is unable to read the configuration from the database. More...
#include <configuration.h>
Public Member Functions | |
StorageConfiguration () | |
Constructor for storage service configuration class. More... | |
~StorageConfiguration () | |
Storage configuration destructor. | |
const char * | getValue (const std::string &key) |
Return a value from the cached configuration category. | |
bool | hasValue (const std::string &key) |
Return if a value exsits for the cached configuration category. | |
bool | setValue (const std::string &key, const std::string &value) |
Set the value of a configuration item. | |
void | updateCategory (const std::string &json) |
Called when the configuration category is updated. | |
DefaultConfigCategory * | getDefaultCategory () |
Return the default category to register with the core. More... | |
The storage service must handle its own configuration differently to other services as it is unable to read the configuration from the database.
The configuration is required in order to connnect to the database. Therefore it keeps a shadow copy in a local file and it keeps this local, cached copy up to date by registering interest in the category and whenever a chaneg is made writing the category to the local cache file.
StorageConfiguration::StorageConfiguration | ( | ) |
Constructor for storage service configuration class.
Update options in deafult configuration for items 'plugin' and 'readingPlugin' with installed plugins
DefaultConfigCategory * StorageConfiguration::getDefaultCategory | ( | ) |
Return the default category to register with the core.
This allows the storage configuration to appear in the UI