Ripples 1.0
High Performant Software Architecture For Transaction Processing
Loading...
Searching...
No Matches
Configuration

Detailed Description

Configuration is stored in a single object which is then shared with threads. At startup, application initializes configuration object with default values, followed by parsing CLI options into configuration settings. CLI options override default settings.

Default settings are stored as constants in constants.h file. Not all settings have CLI option equivalent.

Data Structures

struct  config_s
 

Typedefs

typedef struct config_s config_t
 

Functions

void config_init (config_t *cfg)
 
int config_parse_opts (config_t *cfg, int argc, char *argv[])
 
void config_clean (config_t *cfg)
 

Typedef Documentation

◆ config_t

typedef struct config_s config_t

Structure describes application configuration object.

Function Documentation

◆ config_clean()

void config_clean ( config_t cfg)

Clean configuration object. This will release memory assigned to object parameters, not the object it self.

Parameters
cfgConfiguration object to clean.
Here is the caller graph for this function:

◆ config_init()

void config_init ( config_t cfg)

Initialize configuration object to defaults.

Parameters
cfgConfiguration object to initialize.
Here is the caller graph for this function:

◆ config_parse_opts()

int config_parse_opts ( config_t cfg,
int  argc,
char *  argv[] 
)

Parse command line options into configuration object.

Parameters
cfgConfiguration object where to store parsed options.
argcArray of options strings.
argvNumber of options strings (entries in array).
Returns
On success returns 0, otherwise error occurred.
Here is the call graph for this function:
Here is the caller graph for this function: