1gearman_client_do(3)                Gearman               gearman_client_do(3)
2
3
4

NAME

6       gearman_client_do - Single Task Interface
7

SYNOPSIS

9       #include <libgearman/gearman.h>
10
11         void  *gearman_client_do(gearman_client_st *client, const char *func‐
12       tion_name,  const char *unique, const  void  *workload,   size_t  work‐
13       load_size, size_t *result_size,  gearman_return_t *ret_ptr);
14

DESCRIPTION

16       Run a single task and return an allocated result.  *
17

PARAMETERS

19              [in]   client   Structure   previously  initialized  with  gear‐
20              man_client_create() or gearman_client_clone().
21
22              [in] function_name The name of the function to run.
23
24              [in] unique Optional unique job identifier, or NULL  for  a  new
25              UUID.
26
27              [in]  workload  The  workload to pass to the function when it is
28              run.
29
30              [in] workload_size Size of the workload.
31
32              [out] result_size The size of the data being returned.
33
34              [out] ret_ptr Standard gearman return  value.  In  the  case  of
35              GEARMAN_WORK_DATA, GEARMAN_WORK_WARNING, or GEARMAN_WORK_STATUS,
36              the caller should take any actions to handle the event and  then
37              call this function again. This may happen multiple times until a
38              GEARMAN_WORK_ERROR, GEARMAN_WORK_FAIL, or GEARMAN_SUCCESS  (work
39              complete)   is   returned.   For   GEARMAN_WORK_DATA   or  GEAR‐
40              MAN_WORK_WARNING, the result_size will be set to the  intermedi‐
41              ate  data chunk being returned and an allocated data buffer will
42              be returned. For GEARMAN_WORK_STATUS, the caller can  use  gear‐
43              man_client_do_status() to get the current tasks status.
44

RETURN VALUE

46       The  result  allocated  by the library, this needs to be freed when the
47       caller is done using it.
48

SEE ALSO

50       The Gearman homepage: http://www.gearman.org/
51

BUGS

53       Bugs should be reported at https://bugs.launchpad.net/gearmand
54

COPYING

56       Copyright (C) 2008 Brian Aker, Eric Day. All rights reserved.
57
58       Use and distribution licensed under the BSD license.  See  the  COPYING
59       file in the original source for full text.
60
61
62
63Gearman                           2010-03-15              gearman_client_do(3)
Impressum