1
.TH "MEMCACHED_SERVER_PUSH" "3" "April 09, 2011" "0.47" "libmemcached"
3
memcached_server_push \- libmemcached Documentation
5
.nr rst2man-indent-level 0
9
level \\n[rst2man-indent-level]
10
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17
.\" .rstReportMargin pre:
19
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20
. nr rst2man-indent-level +1
21
.\" .rstReportMargin post:
25
.\" indent \\n[an-margin]
26
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27
.nr rst2man-indent-level -1
28
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31
.\" Man page generated from reStructeredText.
37
C Client Library for memcached (libmemcached, \-lmemcached)
42
#include <libmemcached/memcached.h>
44
uint32_t memcached_server_count (memcached_st *ptr);
46
memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
48
memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
50
memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
52
memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list);
54
memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
56
memcached_server_instance_st memcached_server_get_last_disconnect (const memcached_st *ptr)
58
memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
63
libmemcached(3) performs operations on a list of hosts. The order of these
64
hosts determine routing to keys. Functions are provided to add keys to
65
memcached_st structures. To manipulate lists of servers see
66
memcached_server_st(3).
68
memcached_server_count() provides you a count of the current number of
69
servers being used by a \fBmemcached_st\fP structure.
71
memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
72
allowed, so duplication is not checked. Executing this function with the
73
\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
74
\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
76
memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
77
allowed, so duplication is not checked. Executing this function with out
78
setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
79
\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
81
memcached_server_add_unix_socket() pushes a single UNIX socket into the
82
\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
83
Duplicate servers are allowed, so duplication is not checked. The length
84
of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
86
memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
87
the \fBmemcached_st\fP structure. These servers will be placed at the
88
end. Duplicate servers are allowed, so duplication is not checked. A
89
copy is made of structure so the list provided (and any operations on
90
the list) are not saved.
92
memcached_server_by_key() allows you to provide a key and retrieve the
93
server which would be used for assignment. This structure is cloned
94
from its original structure and must be freed. If NULL is returned you
95
should consult *error. The returning structure should be freed with
96
memcached_server_free().
98
memcached_server_get_last_disconnect() returns a pointer to the last server
99
for which there was a connection problem. It does not mean this particular
100
server is currently dead but if the library is reporting a server is,
101
the returned server is a very good candidate.
103
memcached_server_cursor() takes a memcached_st and loops through the
104
list of hosts currently in the cursor calling the list of callback
105
functions provided. You can optionally pass in a value via
106
context which will be provided to each callback function. An error
107
return from any callback will terminate the loop. memcached_server_cursor()
108
is passed the original caller memcached_st in its current state.
111
Varies, see particular functions.
114
To find out more information please check:
115
\fI\%https://launchpad.net/libmemcached\fP
118
\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
122
2011, Brian Aker DataDifferential, http://datadifferential.com/
123
.\" Generated by docutils manpage writer.