1gearman_worker_add_function(3)      Gearman     gearman_worker_add_function(3)
2
3
4

NAME

6       gearman_worker_add_function - Worker Declarations
7

SYNOPSIS

9       #include <libgearman/gearman.h>
10
11            gearman_return_t     gearman_worker_add_function(gearman_worker_st
12       *worker,   const  char  *function_name,    uint32_t   timeout,    gear‐
13       man_worker_fn *function,  void *context);
14

DESCRIPTION

16       Register and add callback function for worker. To remove functions that
17       have   been   added,   call   gearman_worker_unregister()   or    gear‐
18       man_worker_unregister_all().  *
19

PARAMETERS

21              [in]   worker   Structure   previously  initialized  with  gear‐
22              man_worker_create() or gearman_worker_clone().
23
24              [in] function_name Function name to register.
25
26              [in] timeout Optional timeout (in seconds)  that  specifies  the
27              maximum time a job should. This is enforced on the job server. A
28              value of 0 means an infinite time.
29
30              [in] function Function to run when there is a job ready.
31
32              [in] context Argument to pass into the callback function.
33

RETURN VALUE

35       Standard gearman return value.
36

SEE ALSO

38       The Gearman homepage: http://www.gearman.org/
39

BUGS

41       Bugs should be reported at https://bugs.launchpad.net/gearmand
42

COPYING

44       Copyright (C) 2008 Brian Aker, Eric Day. All rights reserved.
45
46       Use and distribution licensed under the BSD license.  See  the  COPYING
47       file in the original source for full text.
48
49
50
51Gearman                           2010-03-15    gearman_worker_add_function(3)
Impressum