1MEMCACHED_SERVER_CURSOR(3)       libmemcached       MEMCACHED_SERVER_CURSOR(3)
2
3
4

NAME

6       memcached_server_cursor - libmemcached Documentation
7

SYNOPSIS

9       #include <libmemcached/memcached.h>
10
11       memcached_server_fn
12
13       uint32_t memcached_server_count(memcached_st *ptr)
14
15       memcached_return_t     memcached_server_add(memcached_st *ptr,    const
16       char *hostname, in_port_t port)
17
18       memcached_return_t  memcached_server_add_udp(memcached_st *ptr,   const
19       char *hostname, in_port_t port)
20
21       memcached_return_t  memcached_server_add_unix_socket(memcached_st *ptr,
22       const char *socket)
23
24       memcached_return_t memcached_server_push(memcached_st *ptr, const  mem‐
25       cached_server_st *list)
26
27       memcached_server_instance_st memcached_server_by_key(memcached_st *ptr,
28       const char *key, size_t key_length, memcached_return_t *error)
29
30       memcached_server_instance_st memcached_server_get_last_disconnect(const
31       memcached_st *ptr)
32
33       memcached_return_t   memcached_server_cursor(const   memcached_st *ptr,
34       const   memcached_server_fn *callback,   void *context,   uint32_t num‐
35       ber_of_callbacks)
36
37       compile and link with -lmemcached
38

DESCRIPTION

40       libmemcached performs operations on a list of hosts. The order of these
41       hosts determine routing to keys. Functions are provided to add keys  to
42       memcached_st  structures.  To  manipulate  lists  of  servers  see mem‐
43       cached_server_st(3).
44
45       memcached_server_count() provides you a count of the current number  of
46       servers being used by a memcached_st structure.
47
48       memcached_server_add() pushes a single TCP server into the memcached_st
49       structure. This server will be placed at the end. Duplicate servers
50              are allowed, so duplication is not checked. Executing this func‐
51              tion  with  the  MEMCACHED_BEHAVIOR_USE_UDP  behavior  set  will
52              result in a MEMCACHED_INVALID_HOST_PROTOCOL.
53
54       memcached_server_add_udp() pushes a single UDP  server  into  the  mem‐
55       cached_st  structure.  This server will be placed at the end. Duplicate
56       servers are allowed, so duplication  is  not  checked.  Executing  this
57       function  with out setting the MEMCACHED_BEHAVIOR_USE_UDP behavior will
58       result in a MEMCACHED_INVALID_HOST_PROTOCOL.
59
60       memcached_server_add_unix_socket() pushes a single UNIX socket into the
61       memcached_st  structure.  This  UNIX  socket will be placed at the end.
62       Duplicate servers are allowed,  so  duplication  is  not  checked.  The
63       length   of   the  filename  must  be  one  character  less  than  MEM‐
64       CACHED_MAX_HOST_LENGTH.
65
66       memcached_server_push() pushes an array of memcached_server_st into the
67       memcached_st structure. These servers will be placed at the end. Dupli‐
68       cate servers are allowed, so duplication is not checked. A copy is made
69       of  structure so the list provided (and any operations on the list) are
70       not saved.
71
72       memcached_server_by_key() allows you to provide a key and retrieve  the
73       server which would be used for assignment.
74
75       memcached_server_get_last_disconnect()  returns  a  pointer to the last
76       server for which there was a connection problem. It does not mean  this
77       particular  server  is currently dead but if the library is reporting a
78       server is, the returned server is a very good candidate.
79
80       memcached_server_cursor() takes a memcached_st and  loops  through  the
81       list  of  hosts  currently  in  the cursor calling the list of callback
82       functions provided. You can optionally pass  in  a  value  via  context
83       which  will be provided to each callback function. An error return from
84       any callback will  terminate  the  loop.  memcached_server_cursor()  is
85       passed the original caller memcached_st in its current state.
86

RETURN

88       Varies, see particular functions.
89

HOME

91       To find out more information please check: http://libmemcached.org/
92

SEE ALSO

94       memcached(1) libmemcached(3) memcached_strerror(3)
95

AUTHOR

97       Brian Aker
98
100       2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
101
102
103
104
1051.0.16                         January 31, 2013     MEMCACHED_SERVER_CURSOR(3)
Impressum