Class: ConfigHandler

@proceed/machine.ConfigHandler

Reads and writes to config and logging_meta_data Also keeps track of callbacks set for config changes

Methods

(async) createConfigData() → {object}

Creates a new logging_meta_data table

Source:
Returns:

Returns a new logging_meta_data table

Type
object

init()

Configures the HTTP routes

Source:

(async) readConfig(key) → {object}

returns the value for a given key stored in the config

Parameters:
Name Type Description
key string
Source:
Returns:
Type
object

(async) readConfigData(key) → {object}

Returns the value for a given key that is stored in the logging_meta_data

Parameters:
Name Type Description
key

A logging_meta_data key

Source:
Returns:

Returns a logging_meta_data value

Type
object

registerForConfigChange(key, callback)

Stores callbacks to be executed when a certain config-key changes

Parameters:
Name Type Description
key string

the config key

callback function

executed once the value for the key changes

Source:

(async) writeConfigValue(key, value) → {object}

Changes a value in the config, stores it and calls all callbacks associated with the given key

Parameters:
Name Type Description
key

A config key

value

The new config value

Source:
Returns:

The new values in the config table

Type
object