Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventQueue ¶ added in v0.7.0
type EventQueue struct {
// contains filtered or unexported fields
}
EventQueue implements the Queue interface. This doesn't require the external storages such as Redis. Note that EventQueue isn't persistent, this means that queued data may be lost by crash, shutdown or status of not running. If you want to do use a persistent queue, please use another Queue implementation that supports persistence. Also queue won't be shared between different servers but will be shared between other workers in same server.
func (*EventQueue) Dequeue ¶ added in v0.7.0
func (q *EventQueue) Dequeue() (data string, err error)
Dequeue returns the data that fetch from queue.
func (*EventQueue) Enqueue ¶ added in v0.7.0
func (q *EventQueue) Enqueue(data string) error
Enqueue adds data to queue.
func (*EventQueue) New ¶ added in v0.7.0
func (q *EventQueue) New(n int) event.Queue
New returns a new EventQueue.
func (*EventQueue) Stop ¶ added in v0.7.0
func (q *EventQueue) Stop()
Stop wait for Dequeue to complete then will stop a queue.
Click to show internal directories.
Click to hide internal directories.