~fractalcat/gearmand/docfixes

« back to all changes in this revision

Viewing changes to docs/man/gearman_task_context.3

  • Committer: Brian Aker
  • Date: 2012-09-30 23:55:03 UTC
  • mto: (621.4.21 workspace)
  • mto: This revision was merged to the branch mainline in revision 656.
  • Revision ID: brian@tangent.org-20120930235503-u6r0uq1hl0mdj5an
Fix it so that we don't need to store the manpages in the tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "GEARMAN_TASK_CONTEXT" "3" "September 14, 2012" "0.38" "Gearmand"
2
 
.SH NAME
3
 
gearman_task_context \- Gearmand Documentation, http://gearman.info/
4
 
.
5
 
.nr rst2man-indent-level 0
6
 
.
7
 
.de1 rstReportMargin
8
 
\\$1 \\n[an-margin]
9
 
level \\n[rst2man-indent-level]
10
 
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11
 
-
12
 
\\n[rst2man-indent0]
13
 
\\n[rst2man-indent1]
14
 
\\n[rst2man-indent2]
15
 
..
16
 
.de1 INDENT
17
 
.\" .rstReportMargin pre:
18
 
. RS \\$1
19
 
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20
 
. nr rst2man-indent-level +1
21
 
.\" .rstReportMargin post:
22
 
..
23
 
.de UNINDENT
24
 
. RE
25
 
.\" indent \\n[an-margin]
26
 
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27
 
.nr rst2man-indent-level -1
28
 
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
 
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30
 
..
31
 
.\" Man page generated from reStructeredText.
32
 
.
33
 
.SH SYNOPSIS
34
 
.sp
35
 
#include <libgearman/gearman.h>
36
 
.INDENT 0.0
37
 
.TP
38
 
.B gearman_task_st
39
 
.UNINDENT
40
 
.INDENT 0.0
41
 
.TP
42
 
.B void gearman_task_free(\fI\%gearman_task_st\fP\fI\ *task\fP)
43
 
.UNINDENT
44
 
.INDENT 0.0
45
 
.TP
46
 
.B void *gearman_task_context(const \fI\%gearman_task_st\fP\fI\ *task\fP)
47
 
.UNINDENT
48
 
.INDENT 0.0
49
 
.TP
50
 
.B void gearman_task_set_context(\fI\%gearman_task_st\fP\fI\ *task\fP, void\fI\ *context\fP)
51
 
.UNINDENT
52
 
.INDENT 0.0
53
 
.TP
54
 
.B const char *gearman_task_function_name(const \fI\%gearman_task_st\fP\fI\ *task\fP)
55
 
.UNINDENT
56
 
.INDENT 0.0
57
 
.TP
58
 
.B const char *gearman_task_unique(const \fI\%gearman_task_st\fP\fI\ *task\fP)
59
 
.UNINDENT
60
 
.INDENT 0.0
61
 
.TP
62
 
.B const char *gearman_task_job_handle(const \fI\%gearman_task_st\fP\fI\ *task\fP)
63
 
.UNINDENT
64
 
.INDENT 0.0
65
 
.TP
66
 
.B bool gearman_task_is_known(const \fI\%gearman_task_st\fP\fI\ *task\fP)
67
 
.UNINDENT
68
 
.INDENT 0.0
69
 
.TP
70
 
.B bool gearman_task_is_running(const \fI\%gearman_task_st\fP\fI\ *task\fP)
71
 
.UNINDENT
72
 
.INDENT 0.0
73
 
.TP
74
 
.B uint32_t gearman_task_numerator(const \fI\%gearman_task_st\fP\fI\ *task\fP)
75
 
.UNINDENT
76
 
.INDENT 0.0
77
 
.TP
78
 
.B uint32_t gearman_task_denominator(const \fI\%gearman_task_st\fP\fI\ *task\fP)
79
 
.UNINDENT
80
 
.INDENT 0.0
81
 
.TP
82
 
.B void gearman_task_give_workload(\fI\%gearman_task_st\fP\fI\ *task\fP, const void\fI\ *workload\fP, size_t\fI\ workload_size\fP)
83
 
.UNINDENT
84
 
.INDENT 0.0
85
 
.TP
86
 
.B size_t gearman_task_send_workload(\fI\%gearman_task_st\fP\fI\ *task\fP, const void\fI\ *workload\fP, size_t\fI\ workload_size\fP, gearman_return_t\fI\ *ret_ptr\fP)
87
 
.UNINDENT
88
 
.INDENT 0.0
89
 
.TP
90
 
.B const void *gearman_task_data(const \fI\%gearman_task_st\fP\fI\ *task\fP)
91
 
.UNINDENT
92
 
.INDENT 0.0
93
 
.TP
94
 
.B size_t gearman_task_data_size(const \fI\%gearman_task_st\fP\fI\ *task\fP)
95
 
.UNINDENT
96
 
.INDENT 0.0
97
 
.TP
98
 
.B void *gearman_task_take_data(\fI\%gearman_task_st\fP\fI\ *task\fP, size_t\fI\ *data_size\fP)
99
 
.UNINDENT
100
 
.INDENT 0.0
101
 
.TP
102
 
.B size_t gearman_task_recv_data(\fI\%gearman_task_st\fP\fI\ *task\fP, void\fI\ *data\fP, size_t\fI\ data_size\fP, gearman_return_t\fI\ *ret_ptr\fP)
103
 
.UNINDENT
104
 
.INDENT 0.0
105
 
.TP
106
 
.B const char *gearman_task_error(const \fI\%gearman_task_st\fP\fI\ *task\fP)
107
 
.UNINDENT
108
 
.sp
109
 
New in version 0.21.
110
 
.INDENT 0.0
111
 
.TP
112
 
.B gearman_return_t gearman_task_return(const \fI\%gearman_task_st\fP\fI\ *task\fP)
113
 
.UNINDENT
114
 
.sp
115
 
New in version 0.21.
116
 
.sp
117
 
Link with \-lgearman
118
 
.SH DESCRIPTION
119
 
.sp
120
 
A \fI\%gearman_task_st\fP represents a \fItask\fP.  Work that is sent by a \fIclient\fP to a gearman server is seen as a task (a \fIworker\fP recieves a task in the form of a \fIjob\fP.
121
 
.sp
122
 
Tasks, i.e. \fI\%gearman_task_st\fP are created by calling either \fBgearman_execute()\fP, \fBgearman_client_add_task()\fP, or \fBgearman_client_add_task_background()\fP.
123
 
.sp
124
 
\fBgearman_client_add_task_status()\fP can also create \fI\%gearman_task_st\fP, these tasks will be used to
125
 
monitor a previously created \fI\%gearman_task_st\fP.
126
 
.sp
127
 
\fI\%gearman_task_free()\fP is used to free a task. This only needs to be
128
 
done if a task was created with a preallocated structure or if you want to clean up the memory of a specific task.
129
 
.sp
130
 
\fI\%gearman_task_set_context()\fP sets the given context of the \fI\%gearman_task_st\fP. The context can be used to pass information to a \fI\%gearman_task_st\fP.
131
 
.sp
132
 
\fI\%gearman_task_context()\fP returns the context that was used in the creation of the \fI\%gearman_task_st\fP (or that was set with \fI\%gearman_task_set_context()\fP.
133
 
.sp
134
 
\fI\%gearman_task_data()\fP returns the current data that has been returned to the task. \fI\%gearman_task_data_size()\fP will give you the size of the value. \fI\%gearman_task_take_data()\fP is the same as \fI\%gearman_task_data()\fP but the value that is returned must be freed by the client (\fIfree(3)\fP). \fI\%gearman_task_recv_data()\fP can be used with pre\-allocated buffers.
135
 
.sp
136
 
\fI\%gearman_task_is_known()\fP, \fI\%gearman_task_is_running()\fP, \fI\%gearman_task_numerator()\fP, and \fI\%gearman_task_denominator()\fP, return values related to the last status update that was made to the \fI\%gearman_task_st\fP. They do not cause the \fI\%gearman_task_st\fP to update itself.
137
 
.sp
138
 
\fI\%gearman_task_error()\fP return the last error message that the
139
 
\fI\%gearman_task_st\fP encountered. \fI\%gearman_task_return()\fP
140
 
return the last \fBgearman_return_t\fP stored. A value of
141
 
\fBGEARMAN_UNKNOWN_STATE\fP means that the task has not been submitted to
142
 
server yet, or that no function was available if the job has been submitted.
143
 
.SH RETURN VALUE
144
 
.sp
145
 
Various. Values that are returned by \fI\%gearman_task_take_data()\fP must have \fIfree(3)\fP called on them.
146
 
.SH HOME
147
 
.sp
148
 
To find out more information please check:
149
 
\fI\%http://gearman.info/\fP
150
 
.SH SEE ALSO
151
 
.sp
152
 
\fIgearmand(8)\fP \fIlibgearman(3)\fP
153
 
.SH AUTHOR
154
 
Data Differential http://www.datadifferential.com/
155
 
.SH COPYRIGHT
156
 
2012, Data Differential, http://www.datadifferential.com/
157
 
.\" Generated by docutils manpage writer.
158
 
.\" 
159
 
.