1
.TH "LIBGEARMAN" "3" "December 15, 2011" "0.26" "Gearmand"
3
libgearman \- Gearmand Documentation, http://gearman.info/
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.
35
#include <libgearman/gearman.h>
40
\fBlibgearman\fP is a small, thread\-safe client library for the
41
gearman protocol. The code has all been written with an eye to allow
42
for both web and embedded usage. It handles the work behind routing
43
particular keys to specific servers that you specify (and values are
44
matched based on server order as supplied by you). It implements both
45
the \fIclient\fP and \fIworker\fP interfaces.
47
All operations are performed against either a client, ie \fBgearman_client_st\fP
48
or worker, ie \fBgearman_worker_st\fP.
50
Client and Worker structures can either be dynamically allocated or statically
51
allocated. They must then b initialized by \fBgearman_client_create()\fP or \fBgearman_worker_create()\fP.
53
Functions have been written in order to encapsulate all structures in the library. It is
54
recommended that you do not operate directly against the structure.
56
Nearly all functions return a \fBgearman_return_t\fP value.
57
This value can be translated to a printable string with \fBgearman_strerror()\fP.
59
\fBgearman_client_st\fP and \fBgearman_worker_st\fP structures are thread\-safe, but each thread must
60
contain its own structure (that is, if you want to share these among
61
threads you must provide your own locking). No global variables are
64
If you are working with GNU autotools you will want to add the following to
65
your configure.ac to properly include libgearman in your application.
67
PKG_CHECK_MODULES(DEPS, libgearman >= 0.8.0)
74
A number of constants have been provided for in the library.
77
.B GEARMAN_DEFAULT_TCP_PORT
80
The default port used by gearmand(3).
83
.B GEARMAN_DEFAULT_TCP_PORT
86
The default service used by gearmand(3).
89
.B LIBGEARMAN_VERSION_STRING
92
String value of the libgearman version such as "0.20.4"
95
.B LIBGEARMAN_VERSION_HEX
98
Hex value of the version number. "0x00048000" This can be used for comparing versions based on number.
101
.B GEARMAN_UNIQUE_SIZE
104
Largest number of characters that can be used for a unique value.
107
.B GEARMAN_JOB_HANDLE_SIZE
110
Largest number of characters that can will be used for a job handle. Please
111
see \fBgearman_job_handle_t\fP for additional information.
112
.SH THREADS AND PROCESSES
114
When using threads or forked processes it is important to keep an instance
115
of \fBgearman_client_st\fP or \fBgearman_worker_st\fP per process
116
or thread. Without creating your own locking structures you can not share
117
a single \fBgearman_client_st\fP or \fBgearman_worker_st\fP.
120
To find out more information please check:
121
\fI\%https://launchpad.net/libgearman\fP
124
\fIgearmand(8)\fP \fIlibgearman_examples(3)\fP
126
Data Differential http://datadifferential.com/
128
2011, Data Differential, http://datadifferential.com/
129
.\" Generated by docutils manpage writer.