Fledge
An open source edge computing platform for industrial users
StorageConfiguration Class Reference

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.
 
DefaultConfigCategorygetDefaultCategory ()
 Return the default category to register with the core. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ StorageConfiguration()

StorageConfiguration::StorageConfiguration ( )

Constructor for storage service configuration class.

Update options in deafult configuration for items 'plugin' and 'readingPlugin' with installed plugins

Member Function Documentation

◆ getDefaultCategory()

DefaultConfigCategory * StorageConfiguration::getDefaultCategory ( )

Return the default category to register with the core.

This allows the storage configuration to appear in the UI

Returns
DefaultConfigCategory* The default configuration category

The documentation for this class was generated from the following files: