.\" Man page generated from reStructuredText. . .TH "LIBGEARMAN" "3" "Jan 29, 2019" "1.1.18+ds" "Gearmand" .SH NAME libgearman \- Gearmand Documentation, http://gearman.info/ . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp #include .sp Link \-lgearman .SH DESCRIPTION .sp libgearman is a small, thread\-safe client library for the gearman protocol. The code has all been written with an eye to allow for both web and embedded usage. It handles the work behind routing particular keys to specific servers that you specify (and values are matched based on server order as supplied by you). It implements both the client and worker interfaces. .sp All operations are performed against either a client, ie \fBgearman_client_st\fP or worker, ie \fBgearman_worker_st\fP\&. .sp Client and Worker structures can either be dynamically allocated or statically allocated. They must then b initialized by \fBgearman_client_create()\fP or \fBgearman_worker_create()\fP\&. .sp Functions have been written in order to encapsulate all structures in the library. It is recommended that you do not operate directly against the structure. .sp Nearly all functions return a \fBgearman_return_t\fP value. This value can be translated to a printable string with \fBgearman_strerror()\fP\&. .sp \fBgearman_client_st\fP and \fBgearman_worker_st\fP structures are thread\-safe, but each thread must contain its own structure (that is, if you want to share these among threads you must provide your own locking). No global variables are used in this library. .sp If you are working with GNU autotools you will want to add the following to your configure.ac to properly include libgearman in your application. .sp PKG_CHECK_MODULES(DEPS, libgearman >= 0.8.0) AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) .sp Hope you enjoy it! .SH CONSTANTS .sp A number of constants have been provided for in the library. .INDENT 0.0 .TP .B GEARMAN_DEFAULT_TCP_PORT .UNINDENT .sp The default port used by gearmand(3). .INDENT 0.0 .TP .B GEARMAN_DEFAULT_TCP_PORT .UNINDENT .sp The default service used by gearmand(3). .INDENT 0.0 .TP .B LIBGEARMAN_VERSION_STRING .UNINDENT .sp String value of the libgearman version such as "0.20.4" .INDENT 0.0 .TP .B LIBGEARMAN_VERSION_HEX .UNINDENT .sp Hex value of the version number. "0x00048000" This can be used for comparing versions based on number. .INDENT 0.0 .TP .B GEARMAN_UNIQUE_SIZE .UNINDENT .sp Largest number of characters that can be used for a unique value. .INDENT 0.0 .TP .B GEARMAN_JOB_HANDLE_SIZE .UNINDENT .sp Largest number of characters that can will be used for a job handle. Please see \fBgearman_job_handle_t\fP for additional information. .SH THREADS AND PROCESSES .sp When using threads or forked processes it is important to keep an instance of \fBgearman_client_st\fP or \fBgearman_worker_st\fP per process or thread. Without creating your own locking structures you can not share a single \fBgearman_client_st\fP or \fBgearman_worker_st\fP\&. .SH HOME .sp To find out more information please check: \fI\%https://github.com/gearman/gearmand\fP .SH SEE ALSO .sp \fBgearmand(8)\fP \fBlibgearman_examples(3)\fP .SH AUTHOR Data Differential http://www.datadifferential.com/ .SH COPYRIGHT 2011-2019, Data Differential, http://www.datadifferential.com/ .\" Generated by docutils manpage writer. .