redis

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

* 用于关联github.com/RichardKnop/machinery/v2/brokers/redis包中的函数和方法

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerBroadcast

type BrokerBroadcast struct {
	*BrokerGR
	// contains filtered or unexported fields
}

* 扩展支持任务广播的broker

func New

func New(cnf *config.Config, addrs []string, db int) *BrokerBroadcast

func NewWithOptions

func NewWithOptions(cnf *config.Config, addrs []string, db int, opts ...Option) *BrokerBroadcast

func (*BrokerBroadcast) Publish

func (b *BrokerBroadcast) Publish(ctx context.Context, signature *tasks.Signature) error

Publish places a new message on the default queue

func (*BrokerBroadcast) StartConsuming

func (b *BrokerBroadcast) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error)

StartConsuming enters a loop and waits for incoming messages

func (*BrokerBroadcast) StopConsuming

func (b *BrokerBroadcast) StopConsuming()

StopConsuming quits the loop

type BrokerGR

type BrokerGR struct {
	common.Broker
	// contains filtered or unexported fields
}

func (*BrokerGR) GetDelayedTasks

func (b *BrokerGR) GetDelayedTasks() ([]*tasks.Signature, error)

func (*BrokerGR) GetPendingTasks

func (b *BrokerGR) GetPendingTasks(queue string) ([]*tasks.Signature, error)

type Option

type Option func(broadcast *BrokerBroadcast)

func WithBroadcastHeaderKey

func WithBroadcastHeaderKey(key string) Option

func WithRedisBroadcastTasksKey

func WithRedisBroadcastTasksKey(key string) Option

Jump to

Keyboard shortcuts

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