Documentation ¶
Overview ¶
Package packet provides structures to marshal binary data to and from binary data. The specification is located at http://gearman.org/protocol/.
Index ¶
Constants ¶
View Source
const ( // PreSleep = PRE_SLEEP PreSleep = 4 // SubmitJob = SUBMIT_JOB SubmitJob Type = 7 // JobCreated = JOB_CREATED JobCreated = 8 // JobAssign = JOB_ASSIGN JobAssign = 11 // WorkStatus = WORK_STATUS WorkStatus = 12 // WorkComplete = WORK_COMPLETE WorkComplete = 13 // WorkFail = WORK_FAIL WorkFail = 14 // SubmitJobBg = SUBMIT_JOB_BG SubmitJobBg = 18 // WorkData = WORK_DATA WorkData = 28 // WorkWarning = WORK_WARNING WorkWarning = 29 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Packet ¶
type Packet struct { // The Code for the packet: either \0REQ or \0RES Code packetCode // The Type of the packet, e.g. WorkStatus Type Type // The Arguments of the packet Arguments [][]byte }
Packet contains a Gearman packet. See http://gearman.org/protocol/
func (*Packet) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface
func (*Packet) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface
Click to show internal directories.
Click to hide internal directories.