File: gearman_strerror.3

package info (click to toggle)
gearmand 0.33-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,396 kB
  • sloc: cpp: 32,756; sh: 11,771; ansic: 4,962; makefile: 102
file content (339 lines) | stat: -rw-r--r-- 8,876 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
.TH "GEARMAN_STRERROR" "3" "May 04, 2012" "0.33" "Gearmand"
.SH NAME
gearman_strerror \- Gearmand Documentation, http://gearman.info/
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" Man page generated from reStructeredText.
.
.SH SYNOPSIS
.sp
#include <libgearman/gearman.h>
.INDENT 0.0
.TP
.B gearman_return_t
.UNINDENT
.INDENT 0.0
.TP
.B const char *gearman_strerror(\fI\%gearman_return_t\fP\fI\ rc\fP)
.UNINDENT
.INDENT 0.0
.TP
.B bool gearman_success(\fI\%gearman_return_t\fP\fI\ rc\fP)
.UNINDENT
.INDENT 0.0
.TP
.B bool gearman_failed(\fI\%gearman_return_t\fP\fI\ rc\fP)
.UNINDENT
.INDENT 0.0
.TP
.B bool gearman_continue(\fI\%gearman_return_t\fP\fI\ rc\fP)
.UNINDENT
.sp
Compile and link with \-lgearman
.SH DESCRIPTION
.sp
\fI\%gearman_return_t\fP is used as a return/error type for all calls using \fBgearman_client_st\fP and \fBgearman_worker_st\fP.
\fI\%GEARMAN_SUCCESS\fP is returned upon success, otherwise an error is returned. \fI\%gearman_failed()\fP can be used to see if the return value is a failing value.
You can print a text version of the error message with \fI\%gearman_strerror()\fP.
.sp
\fI\%gearman_success()\fP return true if \fI\%GEARMAN_SUCCESS\fP or if
\fI\%GEARMAN_NO_PENDING_TASKS\fP tests true.
.sp
\fI\%gearman_failed()\fP return true if any value other then \fI\%GEARMAN_SUCCESS\fP was provided.
.sp
\fI\%gearman_continue()\fP returns true if any error related to non\-blocking IO
occurred. This should be used for testing loops.
.SS Possible values of \fI\%gearman_return_t\fP:
.INDENT 0.0
.TP
.B GEARMAN_SUCCESS
Success
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_NO_PENDING_TASKS
\fBgearman_client_run_tasks()\fP was called and it has completed all tasks assigned to the client.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_IO_WAIT
Blocking IO was found. gearman_continue() can be used to test for this.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_ERRNO
System error occurred. Use either \fBgearman_client_errno()\fP or \fBgearman_worker_errno()\fP
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_NO_ACTIVE_FDS
No active connections were available.  gearman_continue() can be used to test for this.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_GETADDRINFO
Name resolution failed for a host.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_NO_SERVERS
No servers have been provided for the client/worker.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_LOST_CONNECTION
Connection was lost to the given server.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_MEMORY_ALLOCATION_FAILURE
Memory allocation failed.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_SERVER_ERROR
An error occurred on the server.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_NOT_CONNECTED
Client/Worker is not currently connected to the server.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_COULD_NOT_CONNECT
Server name was valid, but a connection could not be made.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_ECHO_DATA_CORRUPTION
Either \fBgearman_client_echo()\fP or \fBgearman_worker_echo()\fP echo
was unsuccessful because the data was returned from \fBgearmand\fP
corrupted.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_UNKNOWN_STATE
The gearman_return_t was never set.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_FLUSH_DATA
Internal state, should never be seen by either client or worker.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_SEND_BUFFER_TOO_SMALL
Send buffer was too small.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_TIMEOUT
A timeout occurred when making a request to the server.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_ARGUMENT_TOO_LARGE
Argument was too large for the current buffer.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_INVALID_ARGUMENT
One of the arguments to the given API call was invalid. EINVAL will be set if \fBgearman_client_error()\fP or \fBgearman_worker_error()\fP were not settable. This can also be returned if \fBGEARMAN_CLIENT_UNBUFFERED_RESULT\fP was set, but the client is not handling the data correctly.
.UNINDENT
.SS CLIENT ONLY
.INDENT 0.0
.TP
.B GEARMAN_NEED_WORKLOAD_FN
A client was asked for work, but no \fBgearman_workload_fn\fP callback was specified. See \fBgearman_client_set_workload_fn()\fP
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_WORK_FAIL
A task has failed, and the worker has exited with an error or it called \fBgearman_job_send_fail()\fP
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_IN_PROGRESS
\fBgearman_client_job_status()\fP has been called for a \fBgearman_job_handle_t\fP and the Job is currently being run by a worker.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_JOB_EXISTS
\fBgearman_client_job_status()\fP has been called for a \fBgearman_job_handle_t\fP and the Job is currently known by a server, but is not being run by a worker.
.UNINDENT
.SS WORKER ONLY
.INDENT 0.0
.TP
.B GEARMAN_INVALID_FUNCTION_NAME
A worker was sent a request for a job that it did not have a valid function for.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_INVALID_WORKER_FUNCTION
No callback was provided by the worker for a given function.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_NO_REGISTERED_FUNCTION
A request for removing a given function from a worker was invalid since that function did not exist.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_NO_REGISTERED_FUNCTIONS
The worker has not registered any functions.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_NO_JOBS
No jobs were found for the worker.
.UNINDENT
.SS WORKER TO CLIENT
.sp
Client which have registed a custom \fBgearman_actions_t\fP may use these
value as return values to the calling client.
.INDENT 0.0
.TP
.B GEARMAN_WORK_DATA
Worker has sent a chunked piece of data to the client via \fBgearman_job_send_data()\fP
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_WORK_WARNING
Worker has issued a warning to the client via \fBgearman_job_send_warning()\fP
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_WORK_STATUS
Status has been updated by the worker via \fBgearman_job_send_status()\fP
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_WORK_EXCEPTION
Worker has sent an exception the client via \fBgearman_job_send_exception()\fP
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_WORK_FAIL
A task has failed, and the worker has exited with an error or it called \fBgearman_job_send_fail()\fP
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_WORK_ERROR
A task has had an error and will be retried.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_PAUSE
Used only in custom application for client return based on \fI\%GEARMAN_WORK_DATA\fP, \fI\%GEARMAN_WORK_WARNING\fP, \fI\%GEARMAN_WORK_EXCEPTION\fP, \fI\%GEARMAN_WORK_FAIL\fP, or \fI\%GEARMAN_WORK_STATUS\fP. \fI\%gearman_continue()\fP can be used to check for this value.
.UNINDENT
.SS WORKER TO CLIENT
.sp
Any function defined by \fBgearman_worker_define_function()\fP may, and can only, return the following \fI\%gearman_return_t\fP values.
.INDENT 0.0
.TP
.B GEARMAN_SUCCESS
The function successfully completed the job.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_FATAL
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_FAIL
The function failed to complete the job. \fI\%GEARMAN_FATAL\fP is the deprecated name for \fI\%GEARMAN_FAIL\fP
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_ERROR
A task has had an error and will be retried.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_SHUTDOWN
\fI\%GEARMAN_SHUTDOWN\fP is a special case. If it is returned the client will be sent \fI\%GEARMAN_SUCCESS\fP, but \fBgearman_worker_work()\fP will exit with \fI\%GEARMAN_SHUTDOWN\fP.
.UNINDENT
.SS TASK ONLY
.INDENT 0.0
.TP
.B GEARMAN_NOT_FLUSHING
\fBgearman_task_send_workload()\fP failed, it was not in the correct state.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_DATA_TOO_LARGE
\fBgearman_task_send_workload()\fP failed, the data was too large to be sent.
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_UNKNOWN_OPTION
Default state of task return value.
.UNINDENT
.SS PROTOCOL
.sp
If any of these errors occurred the connection will be dropped/reset.
.INDENT 0.0
.TP
.B GEARMAN_INVALID_MAGIC
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_INVALID_COMMAND
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_INVALID_PACKET
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_UNEXPECTED_PACKET
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_TOO_MANY_ARGS
.UNINDENT
.SS DEPRECATED
.INDENT 0.0
.TP
.B GEARMAN_IGNORE_PACKET
.UNINDENT
.INDENT 0.0
.TP
.B GEARMAN_MAX_RETURN
.UNINDENT
.SH SEE ALSO
.sp
\fIgearmand(8)\fP \fIlibgearman(3)\fP \fIgearman_client_error()\fP or \fIgearman_worker_error()\fP
.SH AUTHOR
Data Differential http://www.datadifferential.com/
.SH COPYRIGHT
2012, Data Differential, http://www.datadifferential.com/
.\" Generated by docutils manpage writer.
.\" 
.