Documentation ¶
Overview ¶
Author:ydy Date: Desc:
Author:ydy Date: Desc:
Author:ydy Date: Desc:
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerFactory ¶
type Listener ¶
type Listener interface { OnPause() OnResume() }
A Listener interface represents a listener that can be notified with queue events.
type Producer ¶
type Producer interface { Produce() (string, bool) AddListener(listener ProducerListener) }
type ProducerFactory ¶
type ProducerListener ¶
type ProducerListener interface { OnProducerPause() OnProducerResume() }
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
A Queue is a message queue.
func NewQueue ¶
func NewQueue(producerFactory ProducerFactory, consumerFactory ConsumerFactory) *Queue
func (*Queue) AddListener ¶
func (*Queue) BroadEventCast ¶
func (m *Queue) BroadEventCast(message interface{})
func (*Queue) SetNumConsumer ¶
SetNumConsumer sets the number of consumers.
func (*Queue) SetNumProducer ¶
SetNumProducer sets the number of producers.
Click to show internal directories.
Click to hide internal directories.