diff options
author | Continuous Integration <ci@tangent.org> | 2014-02-16 03:31:37 -0800 |
---|---|---|
committer | Continuous Integration <ci@tangent.org> | 2014-02-16 03:31:37 -0800 |
commit | b163cbc1e82ea834b66e3b4c1e8070394ccb506d (patch) | |
tree | 999734df2e2c288d6726af31f9336beadb2a781a /docs/source/libmemcached | |
parent | 8541a9863cffad457f4d583af6a6c3613250193d (diff) | |
parent | 37deb7fa75a0b3fbea4d58c032446213f0d5a02a (diff) | |
download | libmemcached-trunk.tar.gz |
Diffstat (limited to 'docs/source/libmemcached')
-rw-r--r-- | docs/source/libmemcached/defaults.rst | 36 | ||||
-rw-r--r-- | docs/source/libmemcached/memcached_exist.rst | 53 | ||||
-rw-r--r-- | docs/source/libmemcached/memcached_fetch.rst | 66 | ||||
-rw-r--r-- | docs/source/libmemcached/memcached_last_error_message.rst | 47 | ||||
-rw-r--r-- | docs/source/libmemcached/memcached_return_t.rst | 132 |
5 files changed, 334 insertions, 0 deletions
diff --git a/docs/source/libmemcached/defaults.rst b/docs/source/libmemcached/defaults.rst new file mode 100644 index 00000000..356c0471 --- /dev/null +++ b/docs/source/libmemcached/defaults.rst @@ -0,0 +1,36 @@ +======== +DEFAULTS +======== + + +.. c:macro:: MEMCACHED_DEFAULT_TIMEOUT + +Value 5000 + +.. c:macro:: MEMCACHED_DEFAULT_CONNECT_TIMEOUT + + Value 4000 + +.. c:macro:: MEMCACHED_CONTINUUM_ADDITION + + Value 10. How many extra slots we should build for in the continuum. + +.. c:macro:: MEMCACHED_SERVER_FAILURE_LIMIT + + Value 5 + +.. c:macro:: MEMCACHED_SERVER_FAILURE_RETRY_TIMEOUT + + Value 2 + +.. c:macro:: MEMCACHED_SERVER_FAILURE_DEAD_TIMEOUT + + Value 0 + +.. c:macro:: `MEMCACHED_PREFIX_KEY_MAX_SIZE` + + Value 128 + +.. c:macro:: MEMCACHED_VERSION_STRING_LENGTH + + Value 24 diff --git a/docs/source/libmemcached/memcached_exist.rst b/docs/source/libmemcached/memcached_exist.rst new file mode 100644 index 00000000..806efe6e --- /dev/null +++ b/docs/source/libmemcached/memcached_exist.rst @@ -0,0 +1,53 @@ +=========================== +Determine if a keys exists. +=========================== + +.. index:: object: memcached_st + +-------- +SYNOPSIS +-------- + + +#include <libmemcached/memcached.h> + +.. c:function:: memcached_return_t memcached_exist(memcached_st *ptr, char *key, size_t *key_length) + +.. c:function:: memcached_return_t memcached_exist_by_key(memcached_st *ptr, char *group_key, size_t *group_key_length, char *key, size_t *key_length) + + .. versionadded:: 0.53 + +Compile and link with -lmemcached + + +----------- +DESCRIPTION +----------- + +:c:func:`memcached_exist()` can be used to check to see if a key exists. No value is returned if the key exists, or does not exist, on the server. + + +------ +RETURN +------ + +:c:func:`memcached_exist()` sets error to +to :c:type:`MEMCACHED_SUCCESS` upon finding that the key exists. +:c:type:`MEMCACHED_NOTFOUND` will be return if the key is not found. + + +---- +HOME +---- + +To find out more information please check: +`http://libmemcached.org/ <http://libmemcached.org/>`_ + + +-------- +SEE ALSO +-------- + +:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)` + + diff --git a/docs/source/libmemcached/memcached_fetch.rst b/docs/source/libmemcached/memcached_fetch.rst new file mode 100644 index 00000000..de40c64f --- /dev/null +++ b/docs/source/libmemcached/memcached_fetch.rst @@ -0,0 +1,66 @@ +================= +memcached_fetch +================= + +.. index:: object: memcached_st + +-------- +SYNOPSIS +-------- + + +#include <libmemcached/memcached.h> + +.. c:function:: char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error) + + .. deprecated:: 0.50 + Use :c:func:`memcached_fetch_result` instead. + +Compile and link with -lmemcached + + +----------- +DESCRIPTION +----------- + +:c:func:`memcached_fetch` is used to fetch an individual value from the server. :c:func:`memcached_mget` must always be called before using this method. +You must pass in a key and its length to fetch the object. You must supply +three pointer variables which will give you the state of the returned +object. A :c:type:`uint32_t` pointer to contain whatever flags you stored with the value, a :c:type:`size_t` pointer which will be filled with size of of the +object, and a :c:type:`memcached_return_t` pointer to hold any error. The +object will be returned upon success and NULL will be returned on failure. :c:type:`MEMCACHED_END` is returned by the \*error value when all objects that have been found are returned. The final value upon :c:type:`MEMCACHED_END` is null. + +Values returned by :c:func:`memcached_fetch` must be freed by the caller. + +All of the above functions are not tested when the +:c:type:`MEMCACHED_BEHAVIOR_USE_UDP` has been set. Executing any of these +functions with this behavior on will result in :c:type:`MEMCACHED_NOT_SUPPORTED` being returned, or for those functions which do not return a :c:type:`memcached_return_t`, the error function parameter will be set to :c:type:`MEMCACHED_NOT_SUPPORTED`. + + +------ +RETURN +------ + +:c:func:`memcached_fetch` sets error to +to :c:type:`MEMCACHED_END` upon successful conclusion. +:c:type:`MEMCACHED_NOTFOUND` will be return if no keys at all were found. + +:c:type:`MEMCACHED_KEY_TOO_BIG` is set to error whenever :c:func:`memcached_fetch` was used +and the key was set larger then :c:type:`MEMCACHED_MAX_KEY`, which was the largest +key allowed for the original memcached ascii server. + + +---- +HOME +---- + +To find out more information please check: +`http://libmemcached.org/ <http://libmemcached.org/>`_ + + +-------- +SEE ALSO +-------- + +:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)` :manpage:`memcached_fetch_result(3)` + diff --git a/docs/source/libmemcached/memcached_last_error_message.rst b/docs/source/libmemcached/memcached_last_error_message.rst new file mode 100644 index 00000000..f91f7ae2 --- /dev/null +++ b/docs/source/libmemcached/memcached_last_error_message.rst @@ -0,0 +1,47 @@ +================= +Retrieving errors +================= + + +-------- +SYNOPSIS +-------- + + +#include <libmemcached/memcached.h> + +.. c:function:: const char *memcached_last_error_message(memcached_st *) + +Compile and link with -lmemcached + + +----------- +DESCRIPTION +----------- + +:c:func:`memcached_last_error_message` is used to return the last error +message that the server responded too. If this error came from a specific +server, its hostname and port will be provided in the error message. + +------ +RETURN +------ + +memcached_last_error_message returns a const char* which does not need to be +de-allocated. If no error has occurred then it will return NULL. + +---- +HOME +---- + +To find out more information please check: +`http://libmemcached.org/ <http://libmemcached.org/>`_ + + +-------- +SEE ALSO +-------- + +:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)` + + diff --git a/docs/source/libmemcached/memcached_return_t.rst b/docs/source/libmemcached/memcached_return_t.rst new file mode 100644 index 00000000..9eba3fab --- /dev/null +++ b/docs/source/libmemcached/memcached_return_t.rst @@ -0,0 +1,132 @@ +================================ +Error Codes (memcached_return_t) +================================ + +-------- +SYNOPSIS +-------- + +#include <libmemcached/memcached.h> + +.. c:type:: memcached_return_t + +.. c:function:: const char *libmemcached_strerror(memcached_return_t rc) + +.. c:function:: bool libmemcached_success(memcached_return_t rc) + +.. c:function:: bool libmemcached_failure(memcached_return_t rc) + +.. c:function:: bool libmemcache_continue(memcached_return_t rc) + +.. c:function:: bool memcached_success(memcached_return_t) + +.. c:function:: bool memcached_failure(memcached_return_t) + + +:c:func:`memcached_success` return true if :c:type:`MEMCACHED_SUCCESS` tested true. + +:c:func:`memcached_failure` return true if any value other then :c:type:`MEMCACHED_SUCCESS` was provided. + + +Libmemcached return types: +++++++++++++++++++++++++++ + + +:c:type:`MEMCACHED_SUCCESS` + +:c:type:`MEMCACHED_FAILURE` + +:c:type:`MEMCACHED_HOST_LOOKUP_FAILURE` + +:c:type:`MEMCACHED_CONNECTION_FAILURE` + +:c:type:`MEMCACHED_CONNECTION_BIND_FAILURE` + +:c:type:`MEMCACHED_WRITE_FAILURE` + +:c:type:`MEMCACHED_READ_FAILURE` + +:c:type:`MEMCACHED_UNKNOWN_READ_FAILURE` + +:c:type:`MEMCACHED_PROTOCOL_ERROR` + +:c:type:`MEMCACHED_CLIENT_ERROR` + +:c:type:`MEMCACHED_SERVER_ERROR` + +:c:type:`MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE` + +:c:type:`MEMCACHED_DATA_EXISTS` + +:c:type:`MEMCACHED_DATA_DOES_NOT_EXIST` + +:c:type:`MEMCACHED_NOTSTORED` + +:c:type:`MEMCACHED_STORED` + +:c:type:`MEMCACHED_NOTFOUND` + +:c:type:`MEMCACHED_MEMORY_ALLOCATION_FAILURE` + +:c:type:`MEMCACHED_PARTIAL_READ` + +:c:type:`MEMCACHED_SOME_ERRORS` + +:c:type:`MEMCACHED_NO_SERVERS` + +:c:type:`MEMCACHED_END` + +:c:type:`MEMCACHED_DELETED` + +:c:type:`MEMCACHED_VALUE` + +:c:type:`MEMCACHED_STAT` + +:c:type:`MEMCACHED_ITEM` + +:c:type:`MEMCACHED_ERRNO` + +:c:type:`MEMCACHED_FAIL_UNIX_SOCKET` + +:c:type:`MEMCACHED_NOT_SUPPORTED` + +:c:type:`MEMCACHED_NO_KEY_PROVIDED` + +:c:type:`MEMCACHED_FETCH_NOTFINISHED` + +:c:type:`MEMCACHED_TIMEOUT` + +:c:type:`MEMCACHED_BUFFERED` + +:c:type:`MEMCACHED_BAD_KEY_PROVIDED` + +:c:type:`MEMCACHED_INVALID_HOST_PROTOCOL` + +:c:type:`MEMCACHED_SERVER_MARKED_DEAD` + +:c:type:`MEMCACHED_UNKNOWN_STAT_KEY` + +:c:type:`MEMCACHED_E2BIG` + +:c:type:`MEMCACHED_INVALID_ARGUMENTS` + +:c:type:`MEMCACHED_KEY_TOO_BIG` + +:c:type:`MEMCACHED_AUTH_PROBLEM` + +:c:type:`MEMCACHED_AUTH_FAILURE` + +:c:type:`MEMCACHED_AUTH_CONTINUE` + +:c:type:`MEMCACHED_PARSE_ERROR` + +:c:type:`MEMCACHED_PARSE_USER_ERROR` + +:c:type:`MEMCACHED_DEPRECATED` + +-------- +SEE ALSO +-------- + +:manpage:`memcached` :manpage:`libmemcached` :manpage:`memcached_client_error` or :manpage:`memcached_worker_error` + |