Couchbase C Client
3.3.14
Asynchronous C Client for Couchbase
|
libcouchbase is an asynchronous library for connecting to a Couchbase server and performing data operations.
This contains the API documentation for the library. The documentation consists of both internal and public interfaces.
Using the library is comprised of these steps:
libcouchbase is an asynchronous library which means that operation results are passed to callbacks you define rather than being returned from functions.
Callbacks are passed a cookie
parameter which is a user-defined pointer (i.e. your own pointer which can be NULL
) to associate a specific command with a specific callback invocation.
For simple synchronous use, you will need to call lcb_wait() after each set of scheduled operations. During lcb_wait() the library will block for I/O and invoke your callbacks as the results for the operations arrive.
For non-synchronous use cases you can integrate with a variety of event loops via the various plugins, or integrate one yourself via the IOPS
API (see Network I/O)
Modifying the library's settings (for example, timeout settings) may be done via the lcb_cntl() interface (see Setting List) or via some environment variables (see Environment Variables)
Using the libcouchbase headers is simple. Simply:
into your application.
To link, simply link against libcouchbase
(e.g. -lcouchbase
).
See Interface Attributes for interface stability taxonomy and Thread Safety for information on programming in threaded environments
The library may be configured either programmatically via lcb_cntl(), or via the environment (see Environment Variables)
lcb_t
handle. This is done via lcb_create()cookie
parameter along with it so that you can associate your application's structures via the callback.The Public API section is where you should begin browsing to develop with the library. Any sections not contained within the public API are internal and are provided to aid in developing new features and fixing bugs within the library itself.
The internal headers are organized like so:
In addition to these files, there are several non-core files which exist to provide simple utilities which are not specific to the library:
libcouchbase is a cross platform C library used to interact with Couchbase Server. It is assumed that you know about:
To develop with the I/O integration APIs, you will need to know about: