1LIBGEARMAN(3)                      Gearmand                      LIBGEARMAN(3)
2
3
4

NAME

6       libgearman - Gearmand Documentation, http://gearman.info/
7

SYNOPSIS

9       #include <libgearman/gearman.h>
10
11       Link -lgearman
12

DESCRIPTION

14       libgearman  is a small, thread-safe client library for the gearman pro‐
15       tocol. The code has all been written with an eye to allow for both  web
16       and  embedded usage. It handles the work behind routing particular keys
17       to specific servers that you specify (and values are matched  based  on
18       server  order  as  supplied  by you). It implements both the client and
19       worker interfaces.
20
21       All  operations  are  performed  against  either  a  client,  ie  gear‐
22       man_client_st or worker, ie gearman_worker_st.
23
24       Client  and  Worker  structures  can either be dynamically allocated or
25       statically  allocated.  They  must  then   b   initialized   by   gear‐
26       man_client_create() or gearman_worker_create().
27
28       Functions  have  been written in order to encapsulate all structures in
29       the library. It is recommended that you do not operate directly against
30       the structure.
31
32       Nearly  all  functions return a gearman_return_t value.  This value can
33       be translated to a printable string with gearman_strerror().
34
35       gearman_client_st and gearman_worker_st structures are thread-safe, but
36       each  thread  must  contain  its own structure (that is, if you want to
37       share these among threads you must provide your own locking). No global
38       variables are used in this library.
39
40       If  you are working with GNU autotools you will want to add the follow‐
41       ing to your configure.ac to properly include libgearman in your  appli‐
42       cation.
43
44       PKG_CHECK_MODULES(DEPS,   libgearman  >=  0.8.0)  AC_SUBST(DEPS_CFLAGS)
45       AC_SUBST(DEPS_LIBS)
46
47       Hope you enjoy it!
48

CONSTANTS

50       A number of constants have been provided for in the library.
51
52       GEARMAN_DEFAULT_TCP_PORT
53
54       The default port used by gearmand(3).
55
56       GEARMAN_DEFAULT_TCP_PORT
57
58       The default service used by gearmand(3).
59
60       LIBGEARMAN_VERSION_STRING
61
62       String value of the libgearman version such as "0.20.4"
63
64       LIBGEARMAN_VERSION_HEX
65
66       Hex value of the version number. "0x00048000" This can be used for com‐
67       paring versions based on number.
68
69       GEARMAN_UNIQUE_SIZE
70
71       Largest number of characters that can be used for a unique value.
72
73       GEARMAN_JOB_HANDLE_SIZE
74
75       Largest  number  of  characters that can will be used for a job handle.
76       Please see gearman_job_handle_t for additional information.
77

THREADS AND PROCESSES

79       When using threads or forked processes it is important to keep  an  in‐
80       stance  of  gearman_client_st  or  gearman_worker_st   per  process  or
81       thread.  Without creating your own locking structures you can not share
82       a single gearman_client_st or gearman_worker_st.
83

HOME

85       To      find      out      more      information      please     check:
86       https://github.com/gearman/gearmand
87

SEE ALSO

89       gearmand(8) libgearman_examples(3)
90

AUTHOR

92       Data Differential http://www.datadifferential.com/
93
95       2011-2014, Data Differential, http://www.datadifferential.com/
96
97
98
99
1001.1.20                           Nov 19, 2022                    LIBGEARMAN(3)
Impressum