Couchbase C Client  2.10.0
Asynchronous C Client for Couchbase
cntl.h File Reference

Command codes for libcouchbase. More...

#include "cntl-private.h"

Go to the source code of this file.

Data Structures

struct  lcb_cntl_vbinfo_t
 Structure containing mapping information for a key. More...
 
struct  lcb_logprocs
 
Logging context More...
 
struct  lcb_cntl_vbinfo_t.v.v0
 v0 More...
 

Macros

#define LCB_CNTL_OP_TIMEOUT
 
Operation Timeout More...
 
#define LCB_CNTL_VIEW_TIMEOUT
 
Views Timeout This is the I/O timeout for HTTP requests issues with LCB_HTTP_TYPE_VIEWS More...
 
#define LCB_CNTL_N1QL_TIMEOUT
 
N1QL Timeout This is the I/O timeout for N1QL queries, issued via lcb_n1ql_query() More...
 
#define LCB_CNTL_BUCKETNAME
 
Get the name of the bucket This returns the name of the bucket this instance is connected to, or NULL if not yet connected to a bucket More...
 
#define LCB_CNTL_BUCKETTYPE
 
Get the bucket type. More...
 
#define LCB_CNTL_HANDLETYPE
 
Get the handle type. More...
 
#define LCB_CNTL_VBCONFIG
 Get the vBucket handle. More...
 
#define LCB_CNTL_IOPS
 Get the iops implementation instance. More...
 
#define LCB_CNTL_VBMAP
 
Get the vBucket ID for a given key, based on the current configuration More...
 
#define LCB_CNTL_IP6POLICY
 
IPv4/IPv6 selection policy More...
 
#define LCB_CNTL_CONFERRTHRESH
 
Configuration error threshold. More...
 
#define LCB_CNTL_DURABILITY_TIMEOUT
 
Default timeout for lcb_durability_poll()
This is the time the client will spend sending repeated probes to a given key's vBucket masters and replicas before they are deemed not to have satisfied the durability requirements More...
 
#define LCB_CNTL_DURABILITY_INTERVAL
 
Polling grace interval for lcb_durability_poll() More...
 
#define LCB_CNTL_HTTP_TIMEOUT
 
Timeout for otherwise unspecified HTTP requests More...
 
#define LCB_CNTL_IOPS_DLOPEN_DEBUG
 
Print verbose plugin load information to console More...
 
#define LCB_CNTL_CONFIGURATION_TIMEOUT
 Initial bootstrap timeout. More...
 
#define LCB_CNTL_RANDOMIZE_BOOTSTRAP_HOSTS
 
Randomize order of bootstrap nodes. More...
 
#define LCB_CNTL_CONFIG_CACHE_LOADED
 
Determine if file-based configuration has been loaded More...
 
#define LCB_CNTL_FORCE_SASL_MECH
 
Force a specific SASL mechanism More...
 
#define LCB_CNTL_MAX_REDIRECTS
 
Maximum number of HTTP redirects to follow Set how many redirects the library should follow for the single request. More...
 
#define LCB_CNTL_CONFDELAY_THRESH
 
Refresh Throttling More...
 
#define LCB_CNTL_CONFIG_TRANSPORT
 
Get the transport used to fetch cluster configuration. More...
 
#define LCB_CNTL_CONFIG_NODE_TIMEOUT
 
Per-node configuration timeout. More...
 
#define LCB_CNTL_HTCONFIG_IDLE_TIMEOUT
 
Idling/Persistence for HTTP bootstrap More...
 
#define LCB_CNTL_CHANGESET
 
Get the current SCM changeset for the library binary More...
 
#define LCB_CNTL_CONFIGCACHE
 
File used for the configuration cache. More...
 
#define LCB_CNTL_CONFIGCACHE_RO
 File used for read-only configuration cache. More...
 
#define LCB_CNTL_SSL_MODE
 
Get SSL Mode More...
 
#define LCB_CNTL_SSL_CERT
 
Get SSL Certificate path More...
 
#define LCB_CNTL_SSL_KEY
 
Get SSL private key path More...
 
#define LCB_CNTL_SSL_TRUSTSTORE
 
Get SSL trust store path More...
 
#define LCB_CNTL_SSL_CACERT
 Alias for LCB_CNTL_SSL_CERT for backward compatibility. More...
 
#define LCB_RETRYOPT_CREATE(mode, policy)
 Create a retry setting value. More...
 
#define LCB_RETRYOPT_GETMODE(u)
 Get mode from retry setting value.
 
#define LCB_RETRYOPT_GETPOLICY(u)
 Get policy from retry setting value.
 
#define LCB_CNTL_RETRYMODE
 
Set retry policies More...
 
#define LCB_CNTL_HTCONFIG_URLTYPE
 
Set the URL selection mode. More...
 
#define LCB_CNTL_SYNCDESTROY
 
Determines whether to run the event loop internally within lcb_destroy() until no more I/O resources remain for the library. More...
 
#define LCB_CNTL_CONLOGGER_LEVEL
 
Sets the logging level for the console logger. More...
 
#define LCB_CNTL_CONLOGGER_FP
 Sets the output file (as a FILE*) for the console logger. More...
 
#define LCB_CNTL_DETAILED_ERRCODES
 
Sets the behavior for reporting network errors. More...
 
#define LCB_CNTL_RETRY_INTERVAL
 Sets the interval at which the retry queue will attempt to resend a failed operation. More...
 
#define LCB_CNTL_RETRY_BACKOFF
 When an operation has been retried more than once and it has still not succeeded, the library will attempt to back off for the operation by scheduling it to be retried in LCB_CNTL_RETRY_INTEVAL * ${n} microseconds, where ${n} is the factor controlled by this setting. More...
 
#define LCB_CNTL_RETRY_NMV_IMM
 
Whether commands are retried immediately upon receipt of not-my-vbucket replies. More...
 
#define LCB_CNTL_HTTP_POOLSIZE
 
Set the maximum pool size for pooled http (view request) sockets. More...
 
#define LCB_CNTL_HTTP_REFRESH_CONFIG_ON_ERROR
 
Determine whether or not a new configuration should be received when an error is received over the HTTP API (i.e. More...
 
#define LCB_CNTL_SCHED_IMPLICIT_FLUSH
 
Set the behavior of the lcb_sched_leave() API call. More...
 
#define LCB_CNTL_FETCH_MUTATION_TOKENS
 Request the server to return an additional 16 bytes of data for each mutation operation. More...
 
#define LCB_CNTL_DURABILITY_MUTATION_TOKENS
 
This setting determines whether the lcb_durability_poll() function will transparently attempt to use mutation token functionality (rather than checking the CAS). More...
 
#define LCB_CNTL_MUTATION_TOKENS_SUPPORTED
 
This read-only property determines if the mutation token mechanism is supported on the cluster itself. More...
 
#define LCB_CNTL_RESET_TIMEOUT_ON_WAIT
 
This setting determines if calls to lcb_wait() and lcb_wait3() will reset the timeout of pending operations to the time that lcb_wait() was called, rather than having the operation maintain the time of the call which scheduled it. More...
 
#define LCB_CNTL_N1QL_CLEARACHE
 
Clears the internal prepared statement cache for N1QL More...
 
#define LCB_CNTL_CLIENT_STRING
 
Sets additional text for negotiation. More...
 
#define LCB_CNTL_BUCKET_CRED
 Set credentials for a bucket. More...
 
#define LCB_CNTL_RETRY_NMV_INTERVAL
 
Set the amount of time the client should wait before retrying a not-my-vbucket response packet. More...
 
#define LCB_CNTL_READ_CHUNKSIZE
 
Limit the number of bytes to be read (and thereby processed) during I/O read operations. More...
 
#define LCB_CNTL_ENABLE_ERRMAP
 
Enable/Disable the Error Map feature. More...
 
#define LCB_CNTL_SELECT_BUCKET
 
Enable/Disable sending the SELECT_BUCKET command after authentication. More...
 
#define LCB_CNTL_TCP_KEEPALIVE
 
Enable/Disable setting the TCP_KEEPALIVE option on created sockets. More...
 
#define LCB_CNTL_CONFIG_POLL_INTERVAL
 
Set the amount of time to wait in between polling for a new configuration. More...
 
#define LCB_CNTL_SEND_HELLO
 
From version 2.7.4, the C library sends a HELLO command before authentication. More...
 
#define LCB_CNTL_LOG_REDACTION
 
Once redaction is enabled, anything at ERROR, WARN and INFO will wrap sensitive information with special tags, for further processing with the goal to remove or encrypt that information. More...
 
#define LCB_CNTL_ENABLE_TRACING
 
Activate/deactivate end-to-end tracing. More...
 
#define LCB_CNTL_TRACING_ORPHANED_QUEUE_FLUSH_INTERVAL
 
Flush interval for orphaned spans queue in default tracer. More...
 
#define LCB_CNTL_TRACING_ORPHANED_QUEUE_SIZE
 
Size of orphaned spans queue in default tracer. More...
 
#define LCB_CNTL_TRACING_THRESHOLD_QUEUE_FLUSH_INTERVAL
 
Flush interval for spans with total time over threshold in default tracer. More...
 
#define LCB_CNTL_TRACING_THRESHOLD_QUEUE_SIZE
 
Size of threshold queue in default tracer. More...
 
#define LCB_CNTL_TRACING_THRESHOLD_KV
 
Minimum time for the tracing span of KV service to be considered by threshold tracer. More...
 
#define LCB_CNTL_TRACING_THRESHOLD_N1QL
 
Minimum time for the tracing span of N1QL service to be considered by threshold tracer. More...
 
#define LCB_CNTL_TRACING_THRESHOLD_VIEW
 
Minimum time for the tracing span of VIEW service to be considered by threshold tracer. More...
 
#define LCB_CNTL_TRACING_THRESHOLD_FTS
 
Minimum time for the tracing span of FTS service to be considered by threshold tracer. More...
 
#define LCB_CNTL_TRACING_THRESHOLD_ANALYTICS
 
Minimum time for the tracing span of ANALYTICS service to be considered by threshold tracer. More...
 
#define LCB_CNTL_COMPRESSION_OPTS
 
Control how the library handles compression and deflation to and from the server. More...
 
#define LCB_CNTL_COMPRESSION_MIN_SIZE
 
Minimum size of the document payload to be compressed when compression enabled. More...
 
#define LCB_CNTL_COMPRESSION_MIN_RATIO
 
Minimum compression ratio (compressed / original) of the compressed payload to allow sending it to cluster. More...
 
#define LCB_CNTL_NETWORK
 
Select type of network (alternative addresses). More...
 
#define LCB_CNTL_HTTP_POOL_TIMEOUT
 
The amount of time the pool should wait before closing idle connections. More...
 
#define LCB_CNTL__MAX
 
This is not a command, but rather an indicator of the last item. More...
 
Modes

Modes for the lcb_cntl() mode argument

#define LCB_CNTL_SET
 Modify a setting.
 
#define LCB_CNTL_GET
 Retrieve a setting.
 

Typedefs

typedef const char * lcb_BUCKETCRED[2]
 

Enumerations

enum  lcb_ipv6_t
 Modes for handling IPv6 in the IO layer. More...
 
enum  lcb_SSLOPTS
 
SSL options More...
 
enum  lcb_RETRYMODEOPTS
 Select retry mode to manipulate. More...
 
enum  lcb_RETRYCMDOPTS
 
enum  lcb_HTCONFIG_URLTYPE
 Enumeration representing various URL forms to use for the configuration stream. More...
 
enum  lcbtrace_THRESHOLDOPTS
 
enum  lcb_COMPRESSOPTS
 
Options for how to handle compression More...
 

Logging

Verbose logging may be enabled by default using the environment variable LCB_LOGLEVEL and setting it to a number > 1; higher values produce more verbose output.

The maximum level is 5.

You may also install your own logger using lcb_cntl() and the LCB_CNTL_LOGGER constant. Note that the logger functions will not be called rapidly from within hot paths.

#define LCB_CNTL_LOGGER
 
Access the lcb_logprocs structure More...
 
#define LCB_LOG_SPEC(fmt)
 Helper to express printf spec for sensitive data. More...
 
#define LCB_LOG_UD_OTAG
 
#define LCB_LOG_UD_CTAG
 
#define LCB_LOG_UD(instance, val)
 User data is data that is stored into Couchbase by the application user account. More...
 
#define LCB_LOG_MD_OTAG
 
#define LCB_LOG_MD_CTAG
 
#define LCB_LOG_MD(instance, val)
 Metadata is logical data needed by Couchbase to store and process user data. More...
 
#define LCB_LOG_SD_OTAG
 
#define LCB_LOG_SD_CTAG
 
#define LCB_LOG_SD(instance, val)
 System data is data from other parts of the system Couchbase interacts with over the network. More...
 
enum  lcb_log_severity_t
 
Logging Levels More...
 
typedef void(* lcb_logging_callback) (struct lcb_logprocs_st *procs, unsigned int iid, const char *subsys, int severity, const char *srcfile, int srcline, const char *fmt, va_list ap)
 Logger callback. More...
 

Detailed Description

Command codes for libcouchbase.

These codes may be passed to 'lcb_cntl'.

Note that the constant values are also public API; thus allowing forwards and backwards compatibility.