Configuration Database API RSF v3.9.10
API/CLI to generate config files for RSF-1
This API (Application Programming Interface) document contains pages corresponding to the item in the navigation bar and the side-bar. It is highly recommended that this page and the others listed in the Related Pages section are read before using the API.
This API currently supports 2 specific Database types; GDBM and JSONDB. Despite the API supporting different database types, the resulting configuration file should be formatted the same regardless of what database was used to store the data. For help deciding which database you should use, it is highly recommended that you read the page Which database should I use? for more information.
There are two main methods you can use to write a config file; using the API to write the functions into your own source files or by using the command line interface (CLI) to build and generate your config file without writing your own source code. This document is mainly aimed at showing you how to use the API, to see a list of valid switches, commands and syntax then simply run the ./config_db command with no parameters. If require help for a specific CLI command, running the -H flag before entering the command will print help for that specific command.
Which ever method you decide to use it is HIGHLY RECOMMENDED that you do the following:
Failing to follow these points could cause errors to occur while using the library or may cause data loss. To begin reading through the documentation, it is recommended to start by reading the How this API document is organised page.
If you want to generate a config file for a single node cluster, you need to enable single node cluster mode. To do this you need to set the database property 'prop_single_node_cluster' to 'true'. This can be achieved using the CLI command rsfcdb update prop_single_node_cluster true or by setting the boolean gbls.single_node to true if using the API.
NOTE: This mode is only supported for rsfcdb version 1.6 or higher. You can check your rsfcdb version via the CLI by caliing rsfcdb -V or via the API by checking the value of the macro RSFCONFIG_VERSION_NUMBER.