Versions in this module Expand all Collapse all v1 v1.4.3 Nov 5, 2022 Changes in this version + var ErrNoAvailablePusher = errors.New("no available pusher") + type BalancedPusher struct + func (pusher *BalancedPusher) Name() string + func (pusher *BalancedPusher) Push(message string) error + type Consumer interface + Consume func(string) error + OnEvent func(event interface{}) + type ConsumerFactory func() (Consumer, error) + type Listener interface + OnPause func() + OnResume func() + type MessageQueue interface + Start func() + Stop func() + type MultiPusher struct + func (pusher *MultiPusher) Name() string + func (pusher *MultiPusher) Push(message string) error + type Poller interface + Name func() string + Poll func() string + type ProduceListener interface + OnProducerPause func() + OnProducerResume func() + type Producer interface + AddListener func(listener ProduceListener) + Produce func() (string, bool) + type ProducerFactory func() (Producer, error) + type Pusher interface + Name func() string + Push func(string) error + func NewBalancedPusher(pushers []Pusher) Pusher + func NewMultiPusher(pushers []Pusher) Pusher + type Queue struct + func NewQueue(producerFactory ProducerFactory, consumerFactory ConsumerFactory) *Queue + func (q *Queue) AddListener(listener Listener) + func (q *Queue) Broadcast(message interface{}) + func (q *Queue) SetName(name string) + func (q *Queue) SetNumConsumer(count int) + func (q *Queue) SetNumProducer(count int) + func (q *Queue) Start() + func (q *Queue) Stop()