Documentation ¶
Overview ¶
Package disqchan is an abstraction of Disque messages over Go channels.
The idea is that you create Chan objects on multiple machines. Each of them has to have the same name across machines, and can be used to send and/or receive messages.
Messages can be any object. Messages are serialized as JSON, so the usual rules of JSON marshalling apply
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // The timeout on GETJOB requests GetTimeout = time.Second )
Functions ¶
This section is empty.
Types ¶
type Chan ¶
type Chan struct {
// contains filtered or unexported fields
}
Chan represents a cross machine "channel" over disque
func NewChan ¶
NewChan creates a new disque channel objec with a given name, over a disque cluster with the given addrs. If async is true, messages are sent using disque async replication (see disque docs for details)
func (*Chan) RecvChan ¶
func (c *Chan) RecvChan() <-chan interface{}
RecvChan returns a channel from which received messages can be received.
Before it is called, this Chan is not receiving from the queue