Documentation ¶
Overview ¶
Package queue is a generated GoMock package.
Index ¶
- Constants
- type AliAMQPConfig
- type MachineryQueue
- func NewAliAMQPMqQueue(c *AliAMQPConfig) (*MachineryQueue, error)
- func NewRabbitMqQueue(broker string, defaultQueue string, resultBackend string, resultsExpireIn int, ...) (*MachineryQueue, error)
- func NewRedisQueue(broker string, defaultQueue string, resultBackend string, resultsExpireIn int, ...) (*MachineryQueue, error)
- type MockTaskServerIface
- func (m *MockTaskServerIface) EXPECT() *MockTaskServerIfaceMockRecorder
- func (m *MockTaskServerIface) GetBackend() iface.Backend
- func (m *MockTaskServerIface) GetBroker() iface0.Broker
- func (m *MockTaskServerIface) GetConfig() *config.Config
- func (m *MockTaskServerIface) GetRegisteredTask(arg0 string) (interface{}, error)
- func (m *MockTaskServerIface) GetRegisteredTaskNames() []string
- func (m *MockTaskServerIface) IsTaskRegistered(arg0 string) bool
- func (m *MockTaskServerIface) NewCustomQueueWorker(arg0 string, arg1 int, arg2 string) *v1.Worker
- func (m *MockTaskServerIface) NewWorker(arg0 string, arg1 int) *v1.Worker
- func (m *MockTaskServerIface) RegisterTask(arg0 string, arg1 interface{}) error
- func (m *MockTaskServerIface) RegisterTasks(arg0 map[string]interface{}) error
- func (m *MockTaskServerIface) SendChain(arg0 *tasks.Chain) (*result.ChainAsyncResult, error)
- func (m *MockTaskServerIface) SendChainWithContext(arg0 context.Context, arg1 *tasks.Chain) (*result.ChainAsyncResult, error)
- func (m *MockTaskServerIface) SendChord(arg0 *tasks.Chord, arg1 int) (*result.ChordAsyncResult, error)
- func (m *MockTaskServerIface) SendChordWithContext(arg0 context.Context, arg1 *tasks.Chord, arg2 int) (*result.ChordAsyncResult, error)
- func (m *MockTaskServerIface) SendGroup(arg0 *tasks.Group, arg1 int) ([]*result.AsyncResult, error)
- func (m *MockTaskServerIface) SendGroupWithContext(arg0 context.Context, arg1 *tasks.Group, arg2 int) ([]*result.AsyncResult, error)
- func (m *MockTaskServerIface) SendTask(arg0 *tasks.Signature) (*result.AsyncResult, error)
- func (m *MockTaskServerIface) SendTaskWithContext(arg0 context.Context, arg1 *tasks.Signature) (*result.AsyncResult, error)
- func (m *MockTaskServerIface) SetBackend(arg0 iface.Backend)
- func (m *MockTaskServerIface) SetBroker(arg0 iface0.Broker)
- func (m *MockTaskServerIface) SetConfig(arg0 *config.Config)
- type MockTaskServerIfaceMockRecorder
- func (mr *MockTaskServerIfaceMockRecorder) GetBackend() *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) GetBroker() *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) GetConfig() *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) GetRegisteredTask(arg0 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) GetRegisteredTaskNames() *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) IsTaskRegistered(arg0 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) NewCustomQueueWorker(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) NewWorker(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) RegisterTask(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) RegisterTasks(arg0 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SendChain(arg0 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SendChainWithContext(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SendChord(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SendChordWithContext(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SendGroup(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SendGroupWithContext(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SendTask(arg0 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SendTaskWithContext(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SetBackend(arg0 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SetBroker(arg0 interface{}) *gomock.Call
- func (mr *MockTaskServerIfaceMockRecorder) SetConfig(arg0 interface{}) *gomock.Call
- type TaskServerIface
Constants ¶
const ( QueueRabbitmqExchangetypeDirect = "direct" QueueRabbitmqExchangetypeFanout = "fanout" QueueRabbitmqExchangetypeTopic = "topic" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliAMQPConfig ¶
type AliAMQPConfig struct { AccessKey string // 阿里云accesskey SecretKey string // 阿里云secretKey AliUid int // 阿里云资源owner账户 ID 信息,点击在控制台右上角客户头像进入账号管理查看 EndPoint string // 阿里云amqp接入点 VHost string // vhost DefaultQueue string // 默认队列 ResultBackend string // 任务状态存储后台 ResultsExpireIn int // 任务状态存储时间 Exchange string ExchangeType string BindingKey string PrefetchCount int QueueBindingArgs map[string]interface{} NamedTaskFuncs map[string]interface{} }
type MachineryQueue ¶
type MachineryQueue struct {
TaskServer TaskServerIface
}
func NewAliAMQPMqQueue ¶
func NewAliAMQPMqQueue(c *AliAMQPConfig) (*MachineryQueue, error)
阿里云AMQP消息队列
func NewRabbitMqQueue ¶
func NewRedisQueue ¶
type MockTaskServerIface ¶
type MockTaskServerIface struct {
// contains filtered or unexported fields
}
MockTaskServerIface is a mock of TaskServerIface interface
func NewMockTaskServerIface ¶
func NewMockTaskServerIface(ctrl *gomock.Controller) *MockTaskServerIface
NewMockTaskServerIface creates a new mock instance
func (*MockTaskServerIface) EXPECT ¶
func (m *MockTaskServerIface) EXPECT() *MockTaskServerIfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTaskServerIface) GetBackend ¶
func (m *MockTaskServerIface) GetBackend() iface.Backend
GetBackend mocks base method
func (*MockTaskServerIface) GetBroker ¶
func (m *MockTaskServerIface) GetBroker() iface0.Broker
GetBroker mocks base method
func (*MockTaskServerIface) GetConfig ¶
func (m *MockTaskServerIface) GetConfig() *config.Config
GetConfig mocks base method
func (*MockTaskServerIface) GetRegisteredTask ¶
func (m *MockTaskServerIface) GetRegisteredTask(arg0 string) (interface{}, error)
GetRegisteredTask mocks base method
func (*MockTaskServerIface) GetRegisteredTaskNames ¶
func (m *MockTaskServerIface) GetRegisteredTaskNames() []string
GetRegisteredTaskNames mocks base method
func (*MockTaskServerIface) IsTaskRegistered ¶
func (m *MockTaskServerIface) IsTaskRegistered(arg0 string) bool
IsTaskRegistered mocks base method
func (*MockTaskServerIface) NewCustomQueueWorker ¶
NewCustomQueueWorker mocks base method
func (*MockTaskServerIface) NewWorker ¶
func (m *MockTaskServerIface) NewWorker(arg0 string, arg1 int) *v1.Worker
NewWorker mocks base method
func (*MockTaskServerIface) RegisterTask ¶
func (m *MockTaskServerIface) RegisterTask(arg0 string, arg1 interface{}) error
RegisterTask mocks base method
func (*MockTaskServerIface) RegisterTasks ¶
func (m *MockTaskServerIface) RegisterTasks(arg0 map[string]interface{}) error
RegisterTasks mocks base method
func (*MockTaskServerIface) SendChain ¶
func (m *MockTaskServerIface) SendChain(arg0 *tasks.Chain) (*result.ChainAsyncResult, error)
SendChain mocks base method
func (*MockTaskServerIface) SendChainWithContext ¶
func (m *MockTaskServerIface) SendChainWithContext(arg0 context.Context, arg1 *tasks.Chain) (*result.ChainAsyncResult, error)
SendChainWithContext mocks base method
func (*MockTaskServerIface) SendChord ¶
func (m *MockTaskServerIface) SendChord(arg0 *tasks.Chord, arg1 int) (*result.ChordAsyncResult, error)
SendChord mocks base method
func (*MockTaskServerIface) SendChordWithContext ¶
func (m *MockTaskServerIface) SendChordWithContext(arg0 context.Context, arg1 *tasks.Chord, arg2 int) (*result.ChordAsyncResult, error)
SendChordWithContext mocks base method
func (*MockTaskServerIface) SendGroup ¶
func (m *MockTaskServerIface) SendGroup(arg0 *tasks.Group, arg1 int) ([]*result.AsyncResult, error)
SendGroup mocks base method
func (*MockTaskServerIface) SendGroupWithContext ¶
func (m *MockTaskServerIface) SendGroupWithContext(arg0 context.Context, arg1 *tasks.Group, arg2 int) ([]*result.AsyncResult, error)
SendGroupWithContext mocks base method
func (*MockTaskServerIface) SendTask ¶
func (m *MockTaskServerIface) SendTask(arg0 *tasks.Signature) (*result.AsyncResult, error)
SendTask mocks base method
func (*MockTaskServerIface) SendTaskWithContext ¶
func (m *MockTaskServerIface) SendTaskWithContext(arg0 context.Context, arg1 *tasks.Signature) (*result.AsyncResult, error)
SendTaskWithContext mocks base method
func (*MockTaskServerIface) SetBackend ¶
func (m *MockTaskServerIface) SetBackend(arg0 iface.Backend)
SetBackend mocks base method
func (*MockTaskServerIface) SetBroker ¶
func (m *MockTaskServerIface) SetBroker(arg0 iface0.Broker)
SetBroker mocks base method
func (*MockTaskServerIface) SetConfig ¶
func (m *MockTaskServerIface) SetConfig(arg0 *config.Config)
SetConfig mocks base method
type MockTaskServerIfaceMockRecorder ¶
type MockTaskServerIfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskServerIfaceMockRecorder is the mock recorder for MockTaskServerIface
func (*MockTaskServerIfaceMockRecorder) GetBackend ¶
func (mr *MockTaskServerIfaceMockRecorder) GetBackend() *gomock.Call
GetBackend indicates an expected call of GetBackend
func (*MockTaskServerIfaceMockRecorder) GetBroker ¶
func (mr *MockTaskServerIfaceMockRecorder) GetBroker() *gomock.Call
GetBroker indicates an expected call of GetBroker
func (*MockTaskServerIfaceMockRecorder) GetConfig ¶
func (mr *MockTaskServerIfaceMockRecorder) GetConfig() *gomock.Call
GetConfig indicates an expected call of GetConfig
func (*MockTaskServerIfaceMockRecorder) GetRegisteredTask ¶
func (mr *MockTaskServerIfaceMockRecorder) GetRegisteredTask(arg0 interface{}) *gomock.Call
GetRegisteredTask indicates an expected call of GetRegisteredTask
func (*MockTaskServerIfaceMockRecorder) GetRegisteredTaskNames ¶
func (mr *MockTaskServerIfaceMockRecorder) GetRegisteredTaskNames() *gomock.Call
GetRegisteredTaskNames indicates an expected call of GetRegisteredTaskNames
func (*MockTaskServerIfaceMockRecorder) IsTaskRegistered ¶
func (mr *MockTaskServerIfaceMockRecorder) IsTaskRegistered(arg0 interface{}) *gomock.Call
IsTaskRegistered indicates an expected call of IsTaskRegistered
func (*MockTaskServerIfaceMockRecorder) NewCustomQueueWorker ¶
func (mr *MockTaskServerIfaceMockRecorder) NewCustomQueueWorker(arg0, arg1, arg2 interface{}) *gomock.Call
NewCustomQueueWorker indicates an expected call of NewCustomQueueWorker
func (*MockTaskServerIfaceMockRecorder) NewWorker ¶
func (mr *MockTaskServerIfaceMockRecorder) NewWorker(arg0, arg1 interface{}) *gomock.Call
NewWorker indicates an expected call of NewWorker
func (*MockTaskServerIfaceMockRecorder) RegisterTask ¶
func (mr *MockTaskServerIfaceMockRecorder) RegisterTask(arg0, arg1 interface{}) *gomock.Call
RegisterTask indicates an expected call of RegisterTask
func (*MockTaskServerIfaceMockRecorder) RegisterTasks ¶
func (mr *MockTaskServerIfaceMockRecorder) RegisterTasks(arg0 interface{}) *gomock.Call
RegisterTasks indicates an expected call of RegisterTasks
func (*MockTaskServerIfaceMockRecorder) SendChain ¶
func (mr *MockTaskServerIfaceMockRecorder) SendChain(arg0 interface{}) *gomock.Call
SendChain indicates an expected call of SendChain
func (*MockTaskServerIfaceMockRecorder) SendChainWithContext ¶
func (mr *MockTaskServerIfaceMockRecorder) SendChainWithContext(arg0, arg1 interface{}) *gomock.Call
SendChainWithContext indicates an expected call of SendChainWithContext
func (*MockTaskServerIfaceMockRecorder) SendChord ¶
func (mr *MockTaskServerIfaceMockRecorder) SendChord(arg0, arg1 interface{}) *gomock.Call
SendChord indicates an expected call of SendChord
func (*MockTaskServerIfaceMockRecorder) SendChordWithContext ¶
func (mr *MockTaskServerIfaceMockRecorder) SendChordWithContext(arg0, arg1, arg2 interface{}) *gomock.Call
SendChordWithContext indicates an expected call of SendChordWithContext
func (*MockTaskServerIfaceMockRecorder) SendGroup ¶
func (mr *MockTaskServerIfaceMockRecorder) SendGroup(arg0, arg1 interface{}) *gomock.Call
SendGroup indicates an expected call of SendGroup
func (*MockTaskServerIfaceMockRecorder) SendGroupWithContext ¶
func (mr *MockTaskServerIfaceMockRecorder) SendGroupWithContext(arg0, arg1, arg2 interface{}) *gomock.Call
SendGroupWithContext indicates an expected call of SendGroupWithContext
func (*MockTaskServerIfaceMockRecorder) SendTask ¶
func (mr *MockTaskServerIfaceMockRecorder) SendTask(arg0 interface{}) *gomock.Call
SendTask indicates an expected call of SendTask
func (*MockTaskServerIfaceMockRecorder) SendTaskWithContext ¶
func (mr *MockTaskServerIfaceMockRecorder) SendTaskWithContext(arg0, arg1 interface{}) *gomock.Call
SendTaskWithContext indicates an expected call of SendTaskWithContext
func (*MockTaskServerIfaceMockRecorder) SetBackend ¶
func (mr *MockTaskServerIfaceMockRecorder) SetBackend(arg0 interface{}) *gomock.Call
SetBackend indicates an expected call of SetBackend
func (*MockTaskServerIfaceMockRecorder) SetBroker ¶
func (mr *MockTaskServerIfaceMockRecorder) SetBroker(arg0 interface{}) *gomock.Call
SetBroker indicates an expected call of SetBroker
func (*MockTaskServerIfaceMockRecorder) SetConfig ¶
func (mr *MockTaskServerIfaceMockRecorder) SetConfig(arg0 interface{}) *gomock.Call
SetConfig indicates an expected call of SetConfig
type TaskServerIface ¶
type TaskServerIface interface { NewWorker(consumerTag string, concurrency int) *machinery.Worker NewCustomQueueWorker(consumerTag string, concurrency int, queue string) *machinery.Worker GetBroker() brokersiface.Broker SetBroker(broker brokersiface.Broker) GetBackend() backendsiface.Backend SetBackend(backend backendsiface.Backend) GetConfig() *config.Config SetConfig(cnf *config.Config) RegisterTasks(namedTaskFuncs map[string]interface{}) error RegisterTask(name string, taskFunc interface{}) error IsTaskRegistered(name string) bool GetRegisteredTask(name string) (interface{}, error) SendTaskWithContext(ctx context.Context, signature *tasks.Signature) (*result.AsyncResult, error) SendTask(signature *tasks.Signature) (*result.AsyncResult, error) SendChainWithContext(ctx context.Context, chain *tasks.Chain) (*result.ChainAsyncResult, error) SendChain(chain *tasks.Chain) (*result.ChainAsyncResult, error) SendGroupWithContext(ctx context.Context, group *tasks.Group, sendConcurrency int) ([]*result.AsyncResult, error) SendGroup(group *tasks.Group, sendConcurrency int) ([]*result.AsyncResult, error) SendChordWithContext(ctx context.Context, chord *tasks.Chord, sendConcurrency int) (*result.ChordAsyncResult, error) SendChord(chord *tasks.Chord, sendConcurrency int) (*result.ChordAsyncResult, error) GetRegisteredTaskNames() []string }
mockgen -destination=./machinery_mock.go -package=queue gitee.com/kelvins-io/common/queue TaskServerIface