Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct { Quit chan struct{} Subscriptions map[*Subscription]struct{} Register chan *Subscription Unregister chan *Subscription MessageQueue chan *Message EventHook func(status int) // contains filtered or unexported fields }
func (*Broker) Subscribe ¶
func (b *Broker) Subscribe() *Subscription
func (*Broker) WaitForClose ¶
func (b *Broker) WaitForClose(sub *Subscription)
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) Close ¶
func (c *Subscription) Close()
func (*Subscription) Inject ¶
func (c *Subscription) Inject(msgType string, msgValue string)
Inject a message into the incoming channel
func (*Subscription) Next ¶
func (c *Subscription) Next() <-chan *Message
Click to show internal directories.
Click to hide internal directories.