|
lcbvb_CONFIG * | lcbvb_create (void) |
| Allocate a new config This can be used to create new config object and load it with a JSON config, optionally retrieving the error code.
|
|
lcbvb_CONFIG * | lcbvb_parse_json (const char *data) |
|
int | lcbvb_load_json (lcbvb_CONFIG *vbc, const char *data) |
|
int | lcbvb_load_json_ex (lcbvb_CONFIG *vbc, const char *data, const char *source, char **network) |
|
char * | lcbvb_save_json (lcbvb_CONFIG *vbc) |
| Serialize the current config as a JSON string.
|
|
const char * | lcbvb_get_error (const lcbvb_CONFIG *vbc) |
| Return a string indicating why parsing the configuration failed.
|
|
void | lcbvb_replace_host (lcbvb_CONFIG *cfg, const char *hostname) |
| Replace hostname placeholders with specific host string This function shall replace hostname placeholists with the actual host string specified in hoststr .
|
|
void | lcbvb_destroy (lcbvb_CONFIG *conf) |
|
int | lcbvb_vbmaster (lcbvb_CONFIG *cfg, int vbid) |
|
int | lcbvb_vbreplica (lcbvb_CONFIG *cfg, int vbid, unsigned ix) |
|
int | lcbvb_nmv_remap_ex (lcbvb_CONFIG *cfg, int vbid, int bad, int use_heuristics) |
|
int | lcbvb_map_key (lcbvb_CONFIG *cfg, const void *key, lcb_SIZE n, int *vbid, int *srvix) |
|
int | lcbvb_k2vb (lcbvb_CONFIG *cfg, const void *key, lcb_SIZE n) |
|
int | lcbvb_has_vbucket (lcbvb_CONFIG *vbc, int vbid, int ix) |
|
unsigned | lcbvb_get_nservers (const lcbvb_CONFIG *cfg) |
| Get the number of servers in the bucket. Note that not all servers may actually be available.
|
|
unsigned | lcbvb_get_nreplicas (const lcbvb_CONFIG *cfg) |
| Get the number of replicas the bucket is configured with Note that not all replicas may necessarily be online or available.
|
|
unsigned | lcbvb_get_nvbuckets (const lcbvb_CONFIG *cfg) |
| Get the number of vbuckets the bucket is configured with.
|
|
lcbvb_DISTMODE | lcbvb_get_distmode (const lcbvb_CONFIG *cfg) |
| Get the distribution mode (AKA bucket type) of the bucket.
|
|
int | lcbvb_get_revision (const lcbvb_CONFIG *cfg) |
| Get the revision for this configuration.
|
|
unsigned | lcbvb_get_port (lcbvb_CONFIG *cfg, unsigned ix, lcbvb_SVCTYPE type, lcbvb_SVCMODE mode) |
| Gets the port associated with a given service of a given mode on a given server.
|
|
const char * | lcbvb_get_hostport (lcbvb_CONFIG *cfg, unsigned ix, lcbvb_SVCTYPE type, lcbvb_SVCMODE mode) |
| Return a string for the given service This is like lcbvb_get_port but returns a string in the form of host:port rather than the numeric port.
|
|
const char * | lcbvb_get_hostname (const lcbvb_CONFIG *cfg, unsigned ix) |
| Get the hostname of a given server index. This may be used if all nodes reside on different hostnames, and can be used to answer the question of "which node does this index belong to" without having to perform additional string processing on the port of the string.
|
|
const char * | lcbvb_get_resturl (lcbvb_CONFIG *cfg, unsigned ix, lcbvb_SVCTYPE type, lcbvb_SVCMODE mode) |
| Function to return the URL prefix for a REST service.
|
|
int | lcbvb_get_randhost (const lcbvb_CONFIG *cfg, lcbvb_SVCTYPE type, lcbvb_SVCMODE mode) |
| Convenience function to select a random node for a service.
|
|
int | lcbvb_get_randhost_ex (const lcbvb_CONFIG *cfg, lcbvb_SVCTYPE type, lcbvb_SVCMODE mode, int *used) |
| Get random node, excluding nodes already tried.
|
|
lcbvb_CONFIGDIFF * | lcbvb_compare (lcbvb_CONFIG *from, lcbvb_CONFIG *to) |
| Compare two configurations and return information on the changes.
|
|
void | lcbvb_free_diff (lcbvb_CONFIGDIFF *diff) |
| Free the structure returned by lcbvb_compare()
|
|
lcbvb_CHANGETYPE | lcbvb_get_changetype (lcbvb_CONFIGDIFF *diff) |
| Get a quick summary of the changes in the passed object.
|
|
int | lcbvb_genconfig_ex (lcbvb_CONFIG *vb, const char *name, const char *uuid, const lcbvb_SERVER *servers, unsigned nservers, unsigned nreplica, unsigned nvbuckets) |
| Generate a sample configuration.
|
|
int | lcbvb_genconfig (lcbvb_CONFIG *vb, unsigned nservers, unsigned nreplica, unsigned nvbuckets) |
| Generate a sample configuration used for testing.
|
|
void | lcbvb_genffmap (lcbvb_CONFIG *vb) |
|
void | lcbvb_make_ketama (lcbvb_CONFIG *vb) |
|
const char * | lcbvb_get_capibase (lcbvb_CONFIG *cfg, unsigned ix, lcbvb_SVCMODE mode) |
|
int | vbucket_config_parse (lcbvb_CONFIG *, vbucket_source_t, const char *) |
|
const char * | vbucket_get_error_message (lcbvb_CONFIG *) |
|
lcbvb_CONFIG * | vbucket_config_create (void) |
|
void | vbucket_config_destroy (lcbvb_CONFIG *) |
|
int | vbucket_config_get_num_replicas (lcbvb_CONFIG *) |
|
int | vbucket_config_get_num_vbuckets (lcbvb_CONFIG *) |
|
int | vbucket_config_get_num_servers (lcbvb_CONFIG *) |
|
const char * | vbucket_config_get_server (lcbvb_CONFIG *, int) |
|
const char * | vbucket_config_get_couch_api_base (lcbvb_CONFIG *, int) |
|
const char * | vbucket_config_get_rest_api_server (lcbvb_CONFIG *, int) |
|
lcbvb_DISTMODE | vbucket_config_get_distribution_type (lcbvb_CONFIG *) |
|
int | vbucket_map (lcbvb_CONFIG *, const void *, lcb_SIZE, int *, int *) |
|
int | vbucket_get_vbucket_by_key (lcbvb_CONFIG *, const void *, lcb_SIZE) |
|
int | vbucket_get_master (lcbvb_CONFIG *, int) |
|
int | vbucket_get_replica (lcbvb_CONFIG *, int, int) |
|
lcbvb_CONFIGDIFF * | vbucket_compare (lcbvb_CONFIG *, lcbvb_CONFIG *) |
|
void | vbucket_free_diff (lcbvb_CONFIGDIFF *) |
|
int | vbucket_config_get_revision (lcbvb_CONFIG *) |
|
lcbvb_CHANGETYPE | vbucket_what_changed (lcbvb_CONFIGDIFF *diff) |
|
int | vbucket_config_generate (lcbvb_CONFIG *vb, unsigned, unsigned, unsigned) |
|