ec0de8a7566c51a014551ce5a621bbf76789a97d
[awesomized/libmemcached] / docs / source / libmemcached / memcached_dump.rst
1 Dumping data from a server
2 ==========================
3
4 Get a list of keys found on memcached servers
5
6 .. index:: object: memcached_st
7
8 SYNOPSIS
9 --------
10
11 #include <libmemcached/memcached.h>
12
13 .. function:: memcached_return_t memcached_dump (memcached_st *ptr, memcached_dump_fn *function, void *context, uint32_t number_of_callbacks)
14
15 .. type:: memcached_return_t (*memcached_dump_fn)(memcached_st *ptr, const char *key, size_t key_length, void *context)
16
17 Compile and link with -lmemcached
18
19 DESCRIPTION
20 -----------
21
22 :func:`memcached_dump` is used to get a list of keys found in memcached(1)
23 servers. Because memcached(1) does not guarantee to dump all keys you can not
24 assume you have fetched all keys from the server. The function takes an array
25 of callbacks that it will use to execute on keys as they are found.
26
27 Currently the binary protocol is not tested.
28
29 RETURN VALUE
30 ------------
31
32 A value of type :type:`memcached_return_t` is returned
33 On success that value will be `MEMCACHED_SUCCESS`.
34 Use :func:`memcached_strerror` to translate this value to a printable
35 string.
36
37 SEE ALSO
38 --------
39
40 .. only:: man
41
42 :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`