Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGlobalContext ¶
GetGlobalContext returns a singleton zmq Context for the current Go process.
Types ¶
type Broker ¶
type Broker struct { PubAddr string // Publisher Endpoint Address SubAddr string // Subscriber Endpoint Address BufferSize int // Memory buffer size SubscribeFilter string }
func (Broker) NewPublisher ¶
func (Broker) NewPublisherMust ¶
func (Broker) Subscribe ¶
func (z Broker) Subscribe(filters ...string) *Subscription
Subscribe returns a subscription (channel) for given filters.
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
Forwarder is a zeromq forwarder device acting as a broker between multiple publishers and multiple subscribes.
func NewForwarder ¶
type Message ¶
Message represents a zeromq message with two parts, Key and Value separated by a single space assuming the convention that Key is used to match against subscribe filters.
func NewMessage ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher creates a thread/goroutine-unsafe publisher. Only a single goroutine must use the created publisher.
func (*Publisher) MustPublish ¶
type Subscription ¶
type Subscription struct { Ch chan Message // Channel to read messages from tomb.Tomb // contains filtered or unexported fields }
Subscription provides channel abstraction over zmq SUB sockets
Source Files
¶
Click to show internal directories.
Click to hide internal directories.