1 Dumping data from a server
2 ==========================
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
10 .. type:: memcached_return_t (*memcached_dump_fn)(memcached_st *ptr, const char *key, size_t key_length, void *context)
12 :param ptr: pointer to `memcached_st` object
13 :param key: key string being dumped
14 :param key_length: length of the key without any terminating zero
15 :param context: pointer to the user supplied context
16 :returns: `memcached_return_t` indicating success
18 .. function:: memcached_return_t memcached_dump (memcached_st *ptr, memcached_dump_fn *function, void *context, uint32_t number_of_callbacks)
20 :param ptr: pointer to initialized `memcached_st` struct
21 :param function: pointer to `number_of_callbacks` `memcached_dump_fn` callbacks
22 :param context: pointer to a user managed context
23 :param number_of_callbacks: number of callbacks in the `function` array
24 :returns: `memcached_return_t` indicating success
30 :func:`memcached_dump` is used to get a list of keys found in :manpage:`memcached(1)`
31 servers. Because memcached does not guarantee to dump all keys you can not
32 assume you have fetched all keys from the server. The function takes an array
33 of callbacks that it will use to execute on keys as they are found.
35 Currently the binary protocol is not tested.
40 A value of type :type:`memcached_return_t` is returned.
41 On success that value will be `MEMCACHED_SUCCESS`.
42 Use :func:`memcached_strerror` to translate this value to a printable
50 :manpage:`memcached(1)`
51 :manpage:`libmemcached(3)`
52 :manpage:`memcached_strerror(3)`
56 * :doc:`../libmemcached`
57 * :doc:`memcached_strerror`