Documentation ¶
Overview ¶
Package queue implements a Pub/Sub channel in tsuru. It abstracts which server is being used and handles connection pooling and data transmiting
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Queue ¶
func Queue() (monsterqueue.Queue, error)
func ResetQueue ¶
func ResetQueue()
Types ¶
type PubSubFactory ¶
type PubSubFactory interface { // PubSub returns a PubSubQ instance, identified by the given name. PubSub(name string) (PubSubQ, error) Reset() }
PubSubFactory manages queues. It's able to create new queue and handler instances.
func Factory ¶
func Factory() (PubSubFactory, error)
Factory returns an instance of the PubSubFactory used in tsuru. Only redis pubsub is available.
type PubSubQ ¶
type PubSubQ interface { // Publishes a message using the underlaying queue server. Pub(msg []byte) error // Returns a channel that will yield every message published to this // queue. Sub() (chan []byte, error) // Unsubscribe the queue, this should make sure the channel returned // by Sub() is closed. UnSub() error }
PubSubQ represents an implementation that allows Publishing and Subscribing messages.
Click to show internal directories.
Click to hide internal directories.