Documentation ¶
Index ¶
- type MockJob
- func (m MockJob) Data() []byte
- func (m MockJob) Err() error
- func (m MockJob) Fn() string
- func (m MockJob) Handle() string
- func (m MockJob) OutData() []byte
- func (m *MockJob) SendData(data []byte)
- func (m *MockJob) SendWarning(warning []byte)
- func (m MockJob) UniqueId() string
- func (m *MockJob) UpdateStatus(numerator, denominator int)
- func (m *MockJob) Warnings() [][]byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockJob ¶
type MockJob struct {
Payload, Name, GearmanHandle, Id string
GearmanErr error
GearmanWarnings [][]byte
DataBuffer bytes.Buffer
Numerator, Denominator int
}
MockJob is a fake Gearman job for tests
func CreateMockJob ¶
CreateMockJob creates an object that implements the gearman-go/worker#Job interface
func (*MockJob) SendWarning ¶
SendWarning appends to the array of job warnings
func (*MockJob) UpdateStatus ¶
UpdateStatus updates the progress of job
Click to show internal directories.
Click to hide internal directories.