Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

libgearman(3) [debian man page]

LIBGEARMAN(3)							     Gearmand							     LIBGEARMAN(3)

NAME
libgearman - Gearmand Documentation, http://gearman.info/ SYNOPSIS
#include <libgearman/gearman.h> Link -lgearman DESCRIPTION
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. All operations are performed against either a client, ie gearman_client_st or worker, ie gearman_worker_st. Client and Worker structures can either be dynamically allocated or statically allocated. They must then b initialized by gear- man_client_create() or gearman_worker_create(). 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. Nearly all functions return a gearman_return_t value. This value can be translated to a printable string with gearman_strerror(). gearman_client_st and gearman_worker_st 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. If you are working with GNU autotools you will want to add the following to your configure.ac to properly include libgearman in your appli- cation. PKG_CHECK_MODULES(DEPS, libgearman >= 0.8.0) AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) Hope you enjoy it! CONSTANTS
A number of constants have been provided for in the library. GEARMAN_DEFAULT_TCP_PORT The default port used by gearmand(3). GEARMAN_DEFAULT_TCP_PORT The default service used by gearmand(3). LIBGEARMAN_VERSION_STRING String value of the libgearman version such as "0.20.4" LIBGEARMAN_VERSION_HEX Hex value of the version number. "0x00048000" This can be used for comparing versions based on number. GEARMAN_UNIQUE_SIZE Largest number of characters that can be used for a unique value. GEARMAN_JOB_HANDLE_SIZE Largest number of characters that can will be used for a job handle. Please see gearman_job_handle_t for additional information. THREADS AND PROCESSES
When using threads or forked processes it is important to keep an instance of gearman_client_st or gearman_worker_st per process or thread. Without creating your own locking structures you can not share a single gearman_client_st or gearman_worker_st. HOME
To find out more information please check: https://launchpad.net/libgearman SEE ALSO
gearmand(8) libgearman_examples(3) AUTHOR
Data Differential http://www.datadifferential.com/ COPYRIGHT
2012, Data Differential, http://www.datadifferential.com/ 0.33 May 04, 2012 LIBGEARMAN(3)

Check Out this Related Man Page

GEARMAN_CLIENT_CLONE(3) 					     Gearmand						   GEARMAN_CLIENT_CLONE(3)

NAME
gearman_client_clone - Gearmand Documentation, http://gearman.info/ SYNOPSIS
#include <libgearman/gearman.h> gearman_client_st *gearman_client_create(gearman_client_st *client) gearman_client_st *gearman_client_clone(gearman_client_st *client, const gearman_client_st *from) void gearman_client_free(gearman_client_st *client) Link with -lgearman DESCRIPTION
gearman_client_create() is used to create a c:type:gearman_client_st structure that will then be used by other libgearman client functions to communicate with the server. You should either pass a statically declared gearman_client_st to gearman_client_create() or a NULL. If a NULL passed in then a structure is allocated for you. gearman_client_clone() is similar to gearman_client_create() but it copies the defaults and list of servers from the source gear- man_client_st . If you pass a null as the argument for the source to clone, it is the same as a call to gearman_client_create. If the des- tination argument is NULL a gearman_client_st will be allocated for you. To clean up memory associated with a gearman_client_st structure you should pass it to gearman_client_free when you are finished using it. gearman_client_free() is the only way to make sure all memory is deallocated when you finish using the structure. Warning You may wish to avoid using gearman_client_create() or gearman_client_clone() with a stack based allocation, ie the first parameter. The most common issues related to ABI safety involve stack allocated structures. RETURN VALUE
gearman_client_create returns a pointer to the gearman_client_st that was created (or initialized). On an allocation failure, it returns NULL. gearman_client_clone returns a pointer to the gearman_client_st that was created (or initialized). On an allocation failure, it returns NULL. HOME
To find out more information please check: http://gearman.info/ See also gearmand(8) libgearman(3) gearman_strerror(3) gearman_client_st(3) AUTHOR
Data Differential http://www.datadifferential.com/ COPYRIGHT
2012, Data Differential, http://www.datadifferential.com/ 0.33 May 04, 2012 GEARMAN_CLIENT_CLONE(3)
Man Page