common

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: May 23, 2020 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend added in v1.4.1

type Backend struct {
	// contains filtered or unexported fields
}

Backend represents a base backend structure

func NewBackend added in v1.4.1

func NewBackend(cnf *config.Config) Backend

NewBackend creates new Backend instance

func (*Backend) GetConfig added in v1.4.1

func (b *Backend) GetConfig() *config.Config

GetConfig returns config

type Broker added in v1.4.1

type Broker struct {
	// contains filtered or unexported fields
}

Broker represents a base broker structure

func NewBroker added in v1.4.1

func NewBroker(cnf *config.Config) Broker

NewBroker creates new Broker instance

func (*Broker) AdjustCompleteRoutingKey added in v1.7.9

func (b *Broker) AdjustCompleteRoutingKey(s *tasks.Signature)

func (*Broker) AdjustRoutingKey added in v1.4.1

func (b *Broker) AdjustRoutingKey(s *tasks.Signature)

AdjustRoutingKey makes sure the routing key is correct. If the routing key is an empty string: a) set it to binding key for direct exchange type b) set it to default queue name

func (*Broker) GetConfig added in v1.4.1

func (b *Broker) GetConfig() *config.Config

GetConfig returns config

func (*Broker) GetDelayedTasks added in v1.7.5

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

GetDelayedTasks returns a slice of task.Signatures that are scheduled, but not yet in the queue

func (*Broker) GetPendingTasks added in v1.4.1

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

GetPendingTasks returns a slice of task.Signatures waiting in the queue

func (*Broker) GetRegisteredTaskNames added in v1.4.1

func (b *Broker) GetRegisteredTaskNames() []string

GetRegisteredTaskNames returns registered tasks names

func (*Broker) GetRetry added in v1.4.1

func (b *Broker) GetRetry() bool

GetRetry ...

func (*Broker) GetRetryFunc added in v1.4.1

func (b *Broker) GetRetryFunc() func(chan int)

GetRetryFunc ...

func (*Broker) GetRetryStopChan added in v1.4.1

func (b *Broker) GetRetryStopChan() chan int

GetRetryStopChan ...

func (*Broker) GetStopChan added in v1.4.1

func (b *Broker) GetStopChan() chan int

GetStopChan ...

func (*Broker) IsTaskRegistered added in v1.4.1

func (b *Broker) IsTaskRegistered(name string) bool

IsTaskRegistered returns true if the task is registered with this broker

func (*Broker) Publish added in v1.4.1

func (b *Broker) Publish(signature *tasks.Signature) error

Publish places a new message on the default queue

func (*Broker) SetRegisteredTaskNames added in v1.4.1

func (b *Broker) SetRegisteredTaskNames(names []string)

SetRegisteredTaskNames sets registered task names

func (*Broker) StartConsuming added in v1.4.1

func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor)

StartConsuming is a common part of StartConsuming method

func (*Broker) StopConsuming added in v1.4.1

func (b *Broker) StopConsuming()

StopConsuming is a common part of StopConsuming

type RedisConnector

type RedisConnector struct{}

RedisConnector ...

func (*RedisConnector) NewPool

func (rc *RedisConnector) NewPool(socketPath, host, password string, db int, cnf *config.RedisConfig, tlsConfig *tls.Config) *redis.Pool

NewPool returns a new pool of Redis connections

Jump to

Keyboard shortcuts

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