1
/* Gearman server and library
2
* Copyright (C) 2011 Data Differential
3
* Copyright (C) 2008 Brian Aker, Eric Day
6
* Use and distribution licensed under the BSD license. See
7
* the COPYING file in the parent directory for full text.
12
#define GEARMAN_DEFAULT_TCP_PORT 4730
13
#define GEARMAN_DEFAULT_TCP_PORT_STRING "4730"
14
#define GEARMAN_DEFAULT_TCP_SERVICE "gearman"
16
enum gearman_command_t
19
GEARMAN_COMMAND_CAN_DO, /* W->J: FUNC */
20
GEARMAN_COMMAND_CANT_DO, /* W->J: FUNC */
21
GEARMAN_COMMAND_RESET_ABILITIES, /* W->J: -- */
22
GEARMAN_COMMAND_PRE_SLEEP, /* W->J: -- */
23
GEARMAN_COMMAND_UNUSED,
24
GEARMAN_COMMAND_NOOP, /* J->W: -- */
25
GEARMAN_COMMAND_SUBMIT_JOB, /* C->J: FUNC[0]UNIQ[0]ARGS */
26
GEARMAN_COMMAND_JOB_CREATED, /* J->C: HANDLE */
27
GEARMAN_COMMAND_GRAB_JOB, /* W->J: -- */
28
GEARMAN_COMMAND_NO_JOB, /* J->W: -- */
29
GEARMAN_COMMAND_JOB_ASSIGN, /* J->W: HANDLE[0]FUNC[0]ARG */
30
GEARMAN_COMMAND_WORK_STATUS, /* W->J/C: HANDLE[0]NUMERATOR[0]DENOMINATOR */
31
GEARMAN_COMMAND_WORK_COMPLETE, /* W->J/C: HANDLE[0]RES */
32
GEARMAN_COMMAND_WORK_FAIL, /* W->J/C: HANDLE */
33
GEARMAN_COMMAND_GET_STATUS, /* C->J: HANDLE */
34
GEARMAN_COMMAND_ECHO_REQ, /* ?->J: TEXT */
35
GEARMAN_COMMAND_ECHO_RES, /* J->?: TEXT */
36
GEARMAN_COMMAND_SUBMIT_JOB_BG, /* C->J: FUNC[0]UNIQ[0]ARGS */
37
GEARMAN_COMMAND_ERROR, /* J->?: ERRCODE[0]ERR_TEXT */
38
GEARMAN_COMMAND_STATUS_RES, /* C->J: HANDLE[0]KNOWN[0]RUNNING[0]NUM[0]DENOM */
39
GEARMAN_COMMAND_SUBMIT_JOB_HIGH, /* C->J: FUNC[0]UNIQ[0]ARGS */
40
GEARMAN_COMMAND_SET_CLIENT_ID, /* W->J: [RANDOM_STRING_NO_WHITESPACE] */
41
GEARMAN_COMMAND_CAN_DO_TIMEOUT, /* W->J: FUNC[0]TIMEOUT */
42
GEARMAN_COMMAND_ALL_YOURS,
43
GEARMAN_COMMAND_WORK_EXCEPTION,
44
GEARMAN_COMMAND_OPTION_REQ, /* ?->J: TEXT */
45
GEARMAN_COMMAND_OPTION_RES, /* J->?: TEXT */
46
GEARMAN_COMMAND_WORK_DATA,
47
GEARMAN_COMMAND_WORK_WARNING,
48
GEARMAN_COMMAND_GRAB_JOB_UNIQ, /* W->J: -- */
49
GEARMAN_COMMAND_JOB_ASSIGN_UNIQ, /* J->W: */
50
GEARMAN_COMMAND_SUBMIT_JOB_HIGH_BG,
51
GEARMAN_COMMAND_SUBMIT_JOB_LOW,
52
GEARMAN_COMMAND_SUBMIT_JOB_LOW_BG,
53
GEARMAN_COMMAND_SUBMIT_JOB_SCHED,
54
GEARMAN_COMMAND_SUBMIT_JOB_EPOCH,
55
GEARMAN_COMMAND_SUBMIT_REDUCE_JOB, // C->J: FUNC[0]UNIQ[0]REDUCER[0]UNUSED[0]ARGS
56
GEARMAN_COMMAND_SUBMIT_REDUCE_JOB_BACKGROUND, // C->J: FUNC[0]UNIQ[0]REDUCER[0]UNUSED[0]ARGS
57
GEARMAN_COMMAND_GRAB_JOB_ALL, /* W->J -- */
58
GEARMAN_COMMAND_JOB_ASSIGN_ALL, /* J->W: HANDLE[0]FUNC[0]UNIQ[0]REDUCER[0]ARGS */
59
GEARMAN_COMMAND_MAX /* Always add new commands before this. */
64
typedef enum gearman_command_t gearman_command_t;