controller_redis

package
v0.0.0-...-b628505 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

type ControllerRedis struct {
	*broker.Broker
	// contains filtered or unexported fields
}

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) Publish

func (c *ControllerRedis) Publish(ctx context.Context, t *task.Signature) error

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 (c *ControllerRedis) StartConsuming(concurrency int, handler task.Processor) (bool, error)

func (*ControllerRedis) StopConsuming

func (c *ControllerRedis) StopConsuming()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL