qustavo / goku

Idiomatic queues for different providers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

goku Build Status GoDoc

Idiomatic queues for different providers.
Goku tries to unify queue interaction (currently only SQS is supported only), by using channels.

Usage

First, you need to initialize the library, specifying a provider, in this case sqs_provider is a goamz/SQS instance.

q := goku.NewQueue(
	goku.Reader(sqs_provider),
	goku.Writer(sqs_provider),
)

goku.Queue will expose two channels, one for reading messages Sender(), and one for writing messages Receiver().

After that, you should be able to exchange messages with the queue as follow:

q.Receiver() <- "Message"
msg := <-q.Sender()

For more information, please read the example.

About

Idiomatic queues for different providers

License:GNU General Public License v2.0


Languages

Language:Go 100.0%