Name

libcouchbase — client library for accessing a Couchbase Cluster

Synopsis

cc [ flag… ] file… -lcouchbase [ library… ]

#include <libcouchbase/couchbase.h>

DESCRIPTION

libcouchbase is a callback oriented client which makes it easy to write high performance, thread safe programs.

The key component of libcouchbase is that its asynchronous, giving you full freedom in adding it to your application logic. From using the asynchronous interface you may schedule a lot of operations to be performed, and then you’ll get the callbacks whenever they are performed.

Libcouchbase may be set into a synchronous mode, but by doing so you can only execute a single command at a time.

Another key component of libcouchbase is its use of IO plugins. The inner workings of libcouchbase does not deal with reading / writing directly to a socket, but use a user-provided IO plugin to do so. This allows you to integrate libcouchbase into your application (perhaps you’ve got a special event loop) by simply creating your own IO module. Libcouchbase provides a handfull of predefined IO plugins for various event models.

INTERFACES

The shared object libcouchbase.so.2 with the associated include files provides the public interfaces defined below.

See Intro(3) for additional information on shared object interfaces.

lcb_behavior_get_config_errors_threshold lcb_behavior_set_config_errors_threshold lcb_behavior_get_ipv6 lcb_behavior_set_ipv6 lcb_behavior_get_syncmode lcb_behavior_set_syncmode lcb_connect lcb_create lcb_create_compat lcb_create_io_ops lcb_destroy lcb_destroy_io_ops lcb_disable_timings lcb_enable_timings lcb_flush_buffers lcb_timer_create lcb_timer_destroy lcb_get_cookie lcb_set_cookie lcb_get_host lcb_get_last_error lcb_get_num_nodes lcb_get_num_replicas lcb_get_port lcb_get_replica lcb_get_server_list lcb_get_timeout lcb_get_timings lcb_get_version lcb_is_waiting lcb_strerror lcb_verify_struct_size lcb_breakout lcb_wait lcb_arithmetic lcb_cancel_http_request lcb_flush lcb_get lcb_make_http_request lcb_observe lcb_remove lcb_store lcb_touch lcb_unlock lcb_server_stats lcb_server_versions lcb_set_arithmetic_callback lcb_set_configuration_callback lcb_set_error_callback lcb_set_flush_callback lcb_set_get_callback lcb_set_http_complete_callback lcb_set_http_data_callback lcb_set_observe_callback lcb_set_remove_callback lcb_set_stat_callback lcb_set_store_callback lcb_set_timeout lcb_set_touch_callback lcb_set_unlock_callback lcb_set_verbosity lcb_set_verbosity_callback lcb_set_version_callback lcb_cntl

ENVIRONMENT VARIABLES

LIBCOUCHBASE_EVENT_PLUGIN_NAME

Override type of the IO backend. The value should be either name or path to IO plugin. Currently there are two names recognized (depending on plugin availability): libev and libevent. Also there is a plugin which is built into the core of library: select. In case of path to custom IO plugin, also symbol name required, see LIBCOUCHBASE_EVENT_PLUGIN_SYMBOL below.

Available IO plugins consist of:
  • libevent
  • libev
  • select
  • libuv
  • iocp (Windows Only)

    Availability of a given plugin depends on the platform and installed
    libraries as well as the compilation options of libcouchbase itself.
LIBCOUCHBASE_EVENT_PLUGIN_SYMBOL
Symbol which should be accessibe in the plugin. The library will use the function, associated with the symbol to create new instances of the IO object.

FILES

/usr/include/libcouchbase/couchbase.h

Function prototypes

/usr/lib/libcouchbase.so.2

Shared object

/usr/lib/64/libcouchbase.so.2

64-bit shared object

ATTRIBUTES

See lcb_attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE

Interface Stability

Evolving

MT-Level

MT-Safe

COPYRIGHT

Copyright 2010-2013 Couchbase, Inc.

SEE ALSO

Learn more at http://www.couchbase.com/communities/c.

intro(3), lcb_arithmetic(3couchbase), lcb_attributes(5) lcb_behavior_get_config_errors_threshold(3couchbase), lcb_behavior_get_ipv6(3couchbase), lcb_behavior_get_syncmode(3couchbase), lcb_behavior_set_config_errors_threshold(3couchbase), lcb_behavior_set_ipv6(3couchbase), lcb_behavior_set_syncmode(3couchbase), lcb_breakout(3couchbase), lcb_cancel_http_request(3couchbase), lcb_cntl(3couchbase), lcb_connect(3couchbase), lcb_create(3couchbase), lcb_create_compat(3couchbase), lcb_create_io_ops(3couchbase), lcb_destroy(3couchbase), lcb_destroy_io_ops(3couchbase), lcb_disable_timings(3couchbase), lcb_durability_poll(3couchbase), lcb_enable_timings(3couchbase), lcb_flush(3couchbase), lcb_flush_buffers(3couchbase), lcb_get(3couchbase), lcb_get_cookie(3couchbase), lcb_get_host(3couchbase), lcb_get_last_error(3couchbase), lcb_get_num_nodes(3couchbase), lcb_get_num_replicas(3couchbase), lcb_get_port(3couchbase), lcb_get_replica(3couchbase), lcb_get_server_list(3couchbase), lcb_get_timeout(3couchbase), lcb_get_timings(3couchbase), lcb_get_version(3couchbase), lcb_is_waiting(3couchbase), lcb_make_http_request(3couchbase), lcb_observe(3couchbase), lcb_remove(3couchbase), lcb_server_stats(3couchbase), lcb_server_versions(3couchbase), lcb_set_arithmetic_callback(3couchbase), lcb_set_configuration_callback(3couchbase), lcb_set_cookie(3couchbase), lcb_set_durability_callback(3couchbase), lcb_set_error_callback(3couchbase), lcb_set_flush_callback(3couchbase), lcb_set_get_callback(3couchbase), lcb_set_http_complete_callback(3couchbase), lcb_set_http_data_callback(3couchbase), lcb_set_observe_callback(3couchbase), lcb_set_remove_callback(3couchbase), lcb_set_stat_callback(3couchbase), lcb_set_store_callback(3couchbase), lcb_set_timeout(3couchbase), lcb_set_touch_callback(3couchbase), lcb_set_unlock_callback(3couchbase), lcb_set_verbosity(3couchbase), lcb_set_verbosity_callback(3couchbase), lcb_set_version_callback(3couchbase), lcb_store(3couchbase), lcb_strerror(3couchbase), lcb_timer_create(3couchbase), lcb_timer_destroy(3couchbase), lcb_touch(3couchbase), lcb_unlock(3couchbase), lcb_verify_struct_size(3couchbase), lcb_wait(3couchbase),