Documentation ¶
Index ¶
- func New(cnf *config.Config, host, password, socketPath string, db int) iface.Broker
- func NewGR(cnf *config.Config, addrs []string, db int) iface.Broker
- type Broker
- func (b *Broker) AddCycleTask(signature *tasks.Signature) (*tasks.Signature, error)
- func (b *Broker) DeleteCycleTask(uuid string) error
- func (b *Broker) GetCycleTasks(queue string) ([]*tasks.Signature, error)
- func (b *Broker) GetPendingTasks(queue string) ([]*tasks.Signature, error)
- func (b *Broker) Publish(ctx context.Context, signature *tasks.Signature) error
- func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error)
- func (b *Broker) StopConsuming()
- type BrokerGR
- func (b *BrokerGR) AddCycleTask(signature *tasks.Signature) (*tasks.Signature, error)
- func (b *BrokerGR) DeleteCycleTask(uuid string) error
- func (b *BrokerGR) GetCycleTasks(queue string) ([]*tasks.Signature, error)
- func (b *BrokerGR) GetPendingTasks(queue string) ([]*tasks.Signature, error)
- func (b *BrokerGR) Publish(ctx context.Context, signature *tasks.Signature) error
- func (b *BrokerGR) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error)
- func (b *BrokerGR) StopConsuming()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
type Broker struct { common.Broker common.RedisConnector // contains filtered or unexported fields }
Broker represents a Redis broker
func (*Broker) AddCycleTask ¶ added in v0.1.3
get cycle signatures
func (*Broker) DeleteCycleTask ¶ added in v0.1.3
func (*Broker) GetCycleTasks ¶ added in v0.1.3
get cycle signatures
func (*Broker) GetPendingTasks ¶
GetPendingTasks returns a slice of task signatures waiting in the queue
func (*Broker) StartConsuming ¶
func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error)
StartConsuming enters a loop and waits for incoming messages
type BrokerGR ¶
Broker represents a Redis broker
func (*BrokerGR) AddCycleTask ¶ added in v0.1.3
add cycle signature
func (*BrokerGR) DeleteCycleTask ¶ added in v0.1.3
func (*BrokerGR) GetCycleTasks ¶ added in v0.1.3
get cycle signatures
func (*BrokerGR) GetPendingTasks ¶
GetPendingTasks returns a slice of task signatures waiting in the queue
func (*BrokerGR) StartConsuming ¶
func (b *BrokerGR) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error)
StartConsuming enters a loop and waits for incoming messages
Click to show internal directories.
Click to hide internal directories.