EII ConfigMgr C/C++ Reference
|
Configuration Manager C APIs. More...
#include <ctype.h>
#include "eii/config_manager/kv_store_plugin/kv_store_plugin.h"
#include "eii/config_manager/cfgmgr_util.h"
Go to the source code of this file.
Classes | |
struct | cfgmgr_ctx_t |
struct | cfgmgr_interface_t |
Typedefs | |
typedef kv_store_watch_callback_t | cfgmgr_watch_callback_t |
Configuration Manager C APIs.
void cfgmgr_destroy | ( | cfgmgr_ctx_t * | cfg_mgr | ) |
Destroy cfgmgr_ctx_t* object.
cfg_mgr | - configuration to destroy |
config_value_t* cfgmgr_get_allowed_clients | ( | cfgmgr_interface_t * | ctx | ) |
cfgmgr_get_allowed_clients function to fetch allowed clients
Get Allowed Clients returns the value mapped to AllowedClients key in the Applications Interface. If "*" is mentioned in the allowed clients, the return value will still be "*" notifying user that all the provisioned applications are allowed to get the topics.
ctx | - cfgmgr_interface_t object |
config_t* cfgmgr_get_app_config | ( | cfgmgr_ctx_t * | cfgmgr | ) |
cfgmgr_get_app_config function to return app config
cfgmgr | - cfgmgr_ctx_t object |
config_value_t* cfgmgr_get_app_config_value | ( | cfgmgr_ctx_t * | cfgmgr, |
const char * | key | ||
) |
cfgmgr_get_app_config_value function to fetch config value
cfgmgr | - cfgmgr_ctx_t object |
key | - value of key to be fetched |
config_t* cfgmgr_get_app_interface | ( | cfgmgr_ctx_t * | cfgmgr | ) |
cfgmgr_get_app_interface function to return app interface
cfgmgr | - cfgmgr_ctx_t object |
config_value_t* cfgmgr_get_app_interface_value | ( | cfgmgr_ctx_t * | cfgmgr, |
const char * | key | ||
) |
cfgmgr_get_app_interface_value function to fetch app interface value
cfgmgr | - cfgmgr_ctx_t object |
key | - value of key to be fetched |
config_value_t* cfgmgr_get_appname | ( | cfgmgr_ctx_t * | cfgmgr | ) |
To fetch appname of any service
cfgmgr | - cfgmgr_ctx_t object |
cfgmgr_interface_t* cfgmgr_get_client_by_index | ( | cfgmgr_ctx_t * | cfgmgr, |
int | index | ||
) |
cfgmgr_get_client_by_index function to fetch a client config using its index
cfgmgr | - cfgmgr_ctx_t object |
index | - index of config to be fetched |
cfgmgr_interface_t* cfgmgr_get_client_by_name | ( | cfgmgr_ctx_t * | cfgmgr, |
const char * | name | ||
) |
cfgmgr_get_client_by_name function to fetch a client config using its name
cfgmgr | - cfgmgr_ctx_t object |
name | - name of config to be fetched |
config_value_t* cfgmgr_get_endpoint | ( | cfgmgr_interface_t * | ctx | ) |
get_endpoint_base function to fetch endpoint
ctx | - cfgmgr_interface_t object |
config_value_t* cfgmgr_get_interface_value | ( | cfgmgr_interface_t * | cfgmgr_interface, |
const char * | key | ||
) |
cfgmgr_get_interface_value function to fetch interface value
cfgmgr_interface | - cfgmgr_interface_t object |
key | - value of key to be fetched |
config_t* cfgmgr_get_msgbus_config | ( | cfgmgr_interface_t * | ctx | ) |
cfgmgr_get_msgbus_config function to fetch msgbus config
ctx | - cfgmgr_interface_t object |
int cfgmgr_get_num_clients | ( | cfgmgr_ctx_t * | cfgmgr | ) |
To fetch number of clients in an interface
cfgmgr | - cfgmgr_ctx_t object |
int cfgmgr_get_num_publishers | ( | cfgmgr_ctx_t * | cfgmgr | ) |
To fetch number of publishers in an interface
cfgmgr | - cfgmgr_ctx_t object |
int cfgmgr_get_num_servers | ( | cfgmgr_ctx_t * | cfgmgr | ) |
To fetch number of servers in an interface
cfgmgr | - cfgmgr_ctx_t object |
int cfgmgr_get_num_subscribers | ( | cfgmgr_ctx_t * | cfgmgr | ) |
To fetch number of subscribers in an interface
cfgmgr | - cfgmgr_ctx_t object |
cfgmgr_interface_t* cfgmgr_get_publisher_by_index | ( | cfgmgr_ctx_t * | cfgmgr, |
int | index | ||
) |
cfgmgr_get_publisher_by_index function to fetch a publisher config using its index
cfgmgr | - cfgmgr_ctx_t object |
index | - index of config to be fetched |
cfgmgr_interface_t* cfgmgr_get_publisher_by_name | ( | cfgmgr_ctx_t * | cfgmgr, |
const char * | name | ||
) |
cfgmgr_get_publisher_by_name function to fetch a publisher config using its name
cfgmgr | - cfgmgr_ctx_t object |
name | - name of config to be fetched |
cfgmgr_interface_t* cfgmgr_get_server_by_index | ( | cfgmgr_ctx_t * | cfgmgr, |
int | index | ||
) |
cfgmgr_get_server_by_index function to fetch a server config using its index
cfgmgr | - cfgmgr_ctx_t object |
index | - index of config to be fetched |
cfgmgr_interface_t* cfgmgr_get_server_by_name | ( | cfgmgr_ctx_t * | cfgmgr, |
const char * | name | ||
) |
cfgmgr_get_server_by_name function to fetch a server config using its name
cfgmgr | - cfgmgr_ctx_t object |
name | - name of config to be fetched |
cfgmgr_interface_t* cfgmgr_get_subscriber_by_index | ( | cfgmgr_ctx_t * | cfgmgr, |
int | index | ||
) |
cfgmgr_get_subscriber_by_index function to fetch a subscriber config using its index
cfgmgr | - cfgmgr_ctx_t object |
index | - index of config to be fetched |
cfgmgr_interface_t* cfgmgr_get_subscriber_by_name | ( | cfgmgr_ctx_t * | cfgmgr, |
const char * | name | ||
) |
cfgmgr_get_subscriber_by_name function to fetch a subscriber config using its name
cfgmgr | - cfgmgr_ctx_t object |
name | - name of config to be fetched |
config_value_t* cfgmgr_get_topics | ( | cfgmgr_interface_t * | ctx | ) |
cfgmgr_get_topics function to fetch topics
Returns the value mapped to Topics key in the Applications Interface. If "*" is mentioned in topics, then it is replaced by empty string , as our EIIMessageBus supports the prefix approach, empty prefix considers all/any the topics.
ctx | - cfgmgr_interface_t object |
cfgmgr_ctx_t* cfgmgr_initialize | ( | ) |
cfgmgr_initialize function to create a new cfgmgr_ctx_t instance
void cfgmgr_interface_destroy | ( | cfgmgr_interface_t * | cfg_mgr_interface | ) |
Destroy cfgmgr_ctx_t* object.
cfg_mgr_interface | - configuration to destroy |
cfgmgr_interface_t* cfgmgr_interface_initialize | ( | ) |
cfgmgr_interface_initialize function to create a new cfgmgr_interface_t instance
bool cfgmgr_is_dev_mode | ( | cfgmgr_ctx_t * | cfgmgr | ) |
To check whether environment is dev mode or prod mode
cfgmgr | - cfgmgr_ctx_t object |
bool cfgmgr_set_topics | ( | cfgmgr_interface_t * | ctx, |
char const *const * | topics_list, | ||
int | len | ||
) |
set_topics_base function to set topics
ctx | - cfgmgr_interface_t object |
topics_list | - list of topics to be set |
len | - total number of topics |
void cfgmgr_watch | ( | cfgmgr_ctx_t * | cfgmgr, |
const char * | key, | ||
cfgmgr_watch_callback_t | watch_callback, | ||
void * | user_data | ||
) |
function to register a callback for a specific key
cfgmgr | - cfgmgr_ctx_t object |
key | - key to watch on |
watch_callback | - cfgmgr_watch_callback_t object |
user_data | - user_data to be sent to callback |
void cfgmgr_watch_prefix | ( | cfgmgr_ctx_t * | cfgmgr, |
char * | prefix, | ||
cfgmgr_watch_callback_t | watch_callback, | ||
void * | user_data | ||
) |
function to register a callback for a specific key prefix
cfgmgr | - cfgmgr_ctx_t object |
prefix | - key prefix to watch on |
watch_callback | - cfgmgr_watch_callback_t object |
user_data | - user_data to be sent to callback |