3 Star 4 Fork 1

kelvins-io / common

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
machinery_mock.go 12.99 KB
Copy Edit Raw Blame History
cristiane authored 2020-08-01 11:47 . 初始v1
// Code generated by MockGen. DO NOT EDIT.
// Source: gitee.com/kelvins-io/common/queue (interfaces: TaskServerIface)
// Package queue is a generated GoMock package.
package queue
import (
context "context"
v1 "github.com/RichardKnop/machinery/v1"
iface "github.com/RichardKnop/machinery/v1/backends/iface"
result "github.com/RichardKnop/machinery/v1/backends/result"
iface0 "github.com/RichardKnop/machinery/v1/brokers/iface"
config "github.com/RichardKnop/machinery/v1/config"
tasks "github.com/RichardKnop/machinery/v1/tasks"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// MockTaskServerIface is a mock of TaskServerIface interface
type MockTaskServerIface struct {
ctrl *gomock.Controller
recorder *MockTaskServerIfaceMockRecorder
}
// MockTaskServerIfaceMockRecorder is the mock recorder for MockTaskServerIface
type MockTaskServerIfaceMockRecorder struct {
mock *MockTaskServerIface
}
// NewMockTaskServerIface creates a new mock instance
func NewMockTaskServerIface(ctrl *gomock.Controller) *MockTaskServerIface {
mock := &MockTaskServerIface{ctrl: ctrl}
mock.recorder = &MockTaskServerIfaceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockTaskServerIface) EXPECT() *MockTaskServerIfaceMockRecorder {
return m.recorder
}
// GetBackend mocks base method
func (m *MockTaskServerIface) GetBackend() iface.Backend {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBackend")
ret0, _ := ret[0].(iface.Backend)
return ret0
}
// GetBackend indicates an expected call of GetBackend
func (mr *MockTaskServerIfaceMockRecorder) GetBackend() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackend", reflect.TypeOf((*MockTaskServerIface)(nil).GetBackend))
}
// GetBroker mocks base method
func (m *MockTaskServerIface) GetBroker() iface0.Broker {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBroker")
ret0, _ := ret[0].(iface0.Broker)
return ret0
}
// GetBroker indicates an expected call of GetBroker
func (mr *MockTaskServerIfaceMockRecorder) GetBroker() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBroker", reflect.TypeOf((*MockTaskServerIface)(nil).GetBroker))
}
// GetConfig mocks base method
func (m *MockTaskServerIface) GetConfig() *config.Config {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetConfig")
ret0, _ := ret[0].(*config.Config)
return ret0
}
// GetConfig indicates an expected call of GetConfig
func (mr *MockTaskServerIfaceMockRecorder) GetConfig() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockTaskServerIface)(nil).GetConfig))
}
// GetRegisteredTask mocks base method
func (m *MockTaskServerIface) GetRegisteredTask(arg0 string) (interface{}, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRegisteredTask", arg0)
ret0, _ := ret[0].(interface{})
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetRegisteredTask indicates an expected call of GetRegisteredTask
func (mr *MockTaskServerIfaceMockRecorder) GetRegisteredTask(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRegisteredTask", reflect.TypeOf((*MockTaskServerIface)(nil).GetRegisteredTask), arg0)
}
// GetRegisteredTaskNames mocks base method
func (m *MockTaskServerIface) GetRegisteredTaskNames() []string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRegisteredTaskNames")
ret0, _ := ret[0].([]string)
return ret0
}
// GetRegisteredTaskNames indicates an expected call of GetRegisteredTaskNames
func (mr *MockTaskServerIfaceMockRecorder) GetRegisteredTaskNames() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRegisteredTaskNames", reflect.TypeOf((*MockTaskServerIface)(nil).GetRegisteredTaskNames))
}
// IsTaskRegistered mocks base method
func (m *MockTaskServerIface) IsTaskRegistered(arg0 string) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsTaskRegistered", arg0)
ret0, _ := ret[0].(bool)
return ret0
}
// IsTaskRegistered indicates an expected call of IsTaskRegistered
func (mr *MockTaskServerIfaceMockRecorder) IsTaskRegistered(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTaskRegistered", reflect.TypeOf((*MockTaskServerIface)(nil).IsTaskRegistered), arg0)
}
// NewCustomQueueWorker mocks base method
func (m *MockTaskServerIface) NewCustomQueueWorker(arg0 string, arg1 int, arg2 string) *v1.Worker {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewCustomQueueWorker", arg0, arg1, arg2)
ret0, _ := ret[0].(*v1.Worker)
return ret0
}
// NewCustomQueueWorker indicates an expected call of NewCustomQueueWorker
func (mr *MockTaskServerIfaceMockRecorder) NewCustomQueueWorker(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewCustomQueueWorker", reflect.TypeOf((*MockTaskServerIface)(nil).NewCustomQueueWorker), arg0, arg1, arg2)
}
// NewWorker mocks base method
func (m *MockTaskServerIface) NewWorker(arg0 string, arg1 int) *v1.Worker {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewWorker", arg0, arg1)
ret0, _ := ret[0].(*v1.Worker)
return ret0
}
// NewWorker indicates an expected call of NewWorker
func (mr *MockTaskServerIfaceMockRecorder) NewWorker(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewWorker", reflect.TypeOf((*MockTaskServerIface)(nil).NewWorker), arg0, arg1)
}
// RegisterTask mocks base method
func (m *MockTaskServerIface) RegisterTask(arg0 string, arg1 interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegisterTask", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// RegisterTask indicates an expected call of RegisterTask
func (mr *MockTaskServerIfaceMockRecorder) RegisterTask(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterTask", reflect.TypeOf((*MockTaskServerIface)(nil).RegisterTask), arg0, arg1)
}
// RegisterTasks mocks base method
func (m *MockTaskServerIface) RegisterTasks(arg0 map[string]interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegisterTasks", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RegisterTasks indicates an expected call of RegisterTasks
func (mr *MockTaskServerIfaceMockRecorder) RegisterTasks(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterTasks", reflect.TypeOf((*MockTaskServerIface)(nil).RegisterTasks), arg0)
}
// SendChain mocks base method
func (m *MockTaskServerIface) SendChain(arg0 *tasks.Chain) (*result.ChainAsyncResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendChain", arg0)
ret0, _ := ret[0].(*result.ChainAsyncResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SendChain indicates an expected call of SendChain
func (mr *MockTaskServerIfaceMockRecorder) SendChain(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendChain", reflect.TypeOf((*MockTaskServerIface)(nil).SendChain), arg0)
}
// SendChainWithContext mocks base method
func (m *MockTaskServerIface) SendChainWithContext(arg0 context.Context, arg1 *tasks.Chain) (*result.ChainAsyncResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendChainWithContext", arg0, arg1)
ret0, _ := ret[0].(*result.ChainAsyncResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SendChainWithContext indicates an expected call of SendChainWithContext
func (mr *MockTaskServerIfaceMockRecorder) SendChainWithContext(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendChainWithContext", reflect.TypeOf((*MockTaskServerIface)(nil).SendChainWithContext), arg0, arg1)
}
// SendChord mocks base method
func (m *MockTaskServerIface) SendChord(arg0 *tasks.Chord, arg1 int) (*result.ChordAsyncResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendChord", arg0, arg1)
ret0, _ := ret[0].(*result.ChordAsyncResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SendChord indicates an expected call of SendChord
func (mr *MockTaskServerIfaceMockRecorder) SendChord(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendChord", reflect.TypeOf((*MockTaskServerIface)(nil).SendChord), arg0, arg1)
}
// SendChordWithContext mocks base method
func (m *MockTaskServerIface) SendChordWithContext(arg0 context.Context, arg1 *tasks.Chord, arg2 int) (*result.ChordAsyncResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendChordWithContext", arg0, arg1, arg2)
ret0, _ := ret[0].(*result.ChordAsyncResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SendChordWithContext indicates an expected call of SendChordWithContext
func (mr *MockTaskServerIfaceMockRecorder) SendChordWithContext(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendChordWithContext", reflect.TypeOf((*MockTaskServerIface)(nil).SendChordWithContext), arg0, arg1, arg2)
}
// SendGroup mocks base method
func (m *MockTaskServerIface) SendGroup(arg0 *tasks.Group, arg1 int) ([]*result.AsyncResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendGroup", arg0, arg1)
ret0, _ := ret[0].([]*result.AsyncResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SendGroup indicates an expected call of SendGroup
func (mr *MockTaskServerIfaceMockRecorder) SendGroup(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendGroup", reflect.TypeOf((*MockTaskServerIface)(nil).SendGroup), arg0, arg1)
}
// SendGroupWithContext mocks base method
func (m *MockTaskServerIface) SendGroupWithContext(arg0 context.Context, arg1 *tasks.Group, arg2 int) ([]*result.AsyncResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendGroupWithContext", arg0, arg1, arg2)
ret0, _ := ret[0].([]*result.AsyncResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SendGroupWithContext indicates an expected call of SendGroupWithContext
func (mr *MockTaskServerIfaceMockRecorder) SendGroupWithContext(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendGroupWithContext", reflect.TypeOf((*MockTaskServerIface)(nil).SendGroupWithContext), arg0, arg1, arg2)
}
// SendTask mocks base method
func (m *MockTaskServerIface) SendTask(arg0 *tasks.Signature) (*result.AsyncResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendTask", arg0)
ret0, _ := ret[0].(*result.AsyncResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SendTask indicates an expected call of SendTask
func (mr *MockTaskServerIfaceMockRecorder) SendTask(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTask", reflect.TypeOf((*MockTaskServerIface)(nil).SendTask), arg0)
}
// SendTaskWithContext mocks base method
func (m *MockTaskServerIface) SendTaskWithContext(arg0 context.Context, arg1 *tasks.Signature) (*result.AsyncResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendTaskWithContext", arg0, arg1)
ret0, _ := ret[0].(*result.AsyncResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SendTaskWithContext indicates an expected call of SendTaskWithContext
func (mr *MockTaskServerIfaceMockRecorder) SendTaskWithContext(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTaskWithContext", reflect.TypeOf((*MockTaskServerIface)(nil).SendTaskWithContext), arg0, arg1)
}
// SetBackend mocks base method
func (m *MockTaskServerIface) SetBackend(arg0 iface.Backend) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetBackend", arg0)
}
// SetBackend indicates an expected call of SetBackend
func (mr *MockTaskServerIfaceMockRecorder) SetBackend(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetBackend", reflect.TypeOf((*MockTaskServerIface)(nil).SetBackend), arg0)
}
// SetBroker mocks base method
func (m *MockTaskServerIface) SetBroker(arg0 iface0.Broker) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetBroker", arg0)
}
// SetBroker indicates an expected call of SetBroker
func (mr *MockTaskServerIfaceMockRecorder) SetBroker(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetBroker", reflect.TypeOf((*MockTaskServerIface)(nil).SetBroker), arg0)
}
// SetConfig mocks base method
func (m *MockTaskServerIface) SetConfig(arg0 *config.Config) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetConfig", arg0)
}
// SetConfig indicates an expected call of SetConfig
func (mr *MockTaskServerIfaceMockRecorder) SetConfig(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockTaskServerIface)(nil).SetConfig), arg0)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/kelvins-io/common.git
git@gitee.com:kelvins-io/common.git
kelvins-io
common
common
v1.1.7

Search

344bd9b3 5694891 D2dac590 5694891