kv_config_add_host_port()

#include <kvstore.h>

kv_error_t 
kv_config_add_host_port(kv_config_t *config, 
                        const char *host, 
                        int port); 

Adds an additional host and port pair to the store's configuration. The host/port pair identified here must be for an active node in the store because it is used by the application as a helper host when the application first starts up. Usage of this function is optional. At least one helper host is required, but that helper host is identified when you create the store's configuration using kv_create_config().

Parameters

  • config

    The config parameter points to the configuration structure to which you want to add a helper host. This structure was initially created using kv_create_config().

  • host

    The host parameter is the network name of a node belonging to the store.

  • port

    The port parameter is the helper host's port number.