# README
Description
Queue Lib for glib, internal support Redis Only.
Install
go get github.com/carltd/glib/v2/queue
Usage
Publisher
import (
"github.com/carltd/glib/v2/queue/message"
"github.com/carltd/glib/v2/queue"
_ "github.com/carltd/glib/v2/queue/queue_redis"
)
pub, _ := queue.NewPublisher("redis", "redis://127.0.0.1:6379")
pub.Publish("subject", &message.Message{
Body: util.MustMessageBody(nil, /* point to your protobuffer struct */ ),
})
pub.Close()
Consumer
import (
"github.com/carltd/glib/v2/queue/message"
"github.com/carltd/glib/v2/queue"
_ "github.com/carltd/glib/v2/queue/queue_redis"
)
con, _ := queue.NewConsumer("redis", "redis://127.0.0.1:6379")
sub,_ := con.Subscribe("subject", "cluster-group")
msg, _ := sub.NextMessage(time.Second)
// logic for msg
con.Close()
# Packages
Package message is a generated protocol buffer package.
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
Drivers returns a sorted list of the names of the registered drivers.
No description provided by the author
No description provided by the author
Register makes a queue driver available by the provided name.
# Variables
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author