Documentation ¶
Index ¶
- func NewControllerRedis(broker *broker.Broker, client redis.UniversalClient, ...) controller.Controller
- type ControllerRedis
- func (c *ControllerRedis) GetDelayedTasks() ([]*task.Signature, error)
- func (c *ControllerRedis) GetPendingTasks(queue string) ([]*task.Signature, error)
- func (c *ControllerRedis) IsRegisterTask(name string) bool
- func (c *ControllerRedis) Publish(ctx context.Context, t *task.Signature) error
- func (c *ControllerRedis) RegisterTask(name ...string)
- func (c *ControllerRedis) SetConsumingQueue(consumingQueue string)
- func (c *ControllerRedis) SetDelayedQueue(delayedQueue string)
- func (c *ControllerRedis) StartConsuming(concurrency int, handler task.Processor) (bool, error)
- func (c *ControllerRedis) StopConsuming()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewControllerRedis ¶
func NewControllerRedis(broker *broker.Broker, client redis.UniversalClient, consumingQueue, delayedQueue string) controller.Controller
Types ¶
type ControllerRedis ¶
func (*ControllerRedis) GetDelayedTasks ¶
func (c *ControllerRedis) GetDelayedTasks() ([]*task.Signature, error)
func (*ControllerRedis) GetPendingTasks ¶
func (c *ControllerRedis) GetPendingTasks(queue string) ([]*task.Signature, error)
func (*ControllerRedis) IsRegisterTask ¶
func (c *ControllerRedis) IsRegisterTask(name string) bool
func (*ControllerRedis) RegisterTask ¶
func (c *ControllerRedis) RegisterTask(name ...string)
func (*ControllerRedis) SetConsumingQueue ¶
func (c *ControllerRedis) SetConsumingQueue(consumingQueue string)
SetConsumingQueue 设置消费队列名称
func (*ControllerRedis) SetDelayedQueue ¶
func (c *ControllerRedis) SetDelayedQueue(delayedQueue string)
SetDelayedQueue 设置延迟队列名称
func (*ControllerRedis) StartConsuming ¶
func (*ControllerRedis) StopConsuming ¶
func (c *ControllerRedis) StopConsuming()
Click to show internal directories.
Click to hide internal directories.