Merge branch 'master' of github.com:mikespook/gearman-go

This commit is contained in:
Xing Xing 2014-01-09 16:17:05 +08:00
commit 57337a6004
2 changed files with 15 additions and 0 deletions

View File

@ -24,6 +24,18 @@ func (inpack *inPack) Data() []byte {
return inpack.data return inpack.data
} }
func (inpack *inPack) Fn() string {
return inpack.fn
}
func (inpack *inPack) Handle() string {
return inpack.handle
}
func (inpack *inPack) UniqueId() string {
return inpack.uniqueId
}
func (inpack *inPack) Err() error { func (inpack *inPack) Err() error {
if inpack.dataType == dtError { if inpack.dataType == dtError {
return getError(inpack.data) return getError(inpack.data)

View File

@ -3,7 +3,10 @@ package worker
type Job interface { type Job interface {
Err() error Err() error
Data() []byte Data() []byte
Fn() string
SendWarning(data []byte) SendWarning(data []byte)
SendData(data []byte) SendData(data []byte)
UpdateStatus(numerator, denominator int) UpdateStatus(numerator, denominator int)
Handle() string
UniqueId() string
} }