Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker is a message store and message distributer with a single topic. TODO: implement topics
func (*Broker) Run ¶
Run starts the broker. Run is a blocking call and should be started as goroutine.
type Consumer ¶
type Consumer interface {
Receive(string)
}
Consumer is the interface for registering consumers at the broker. The broker will call the consumer's Receive method to forward messages from the broker.
type MyConsumer ¶
type MyConsumer struct {
Id string
}
MyConsumer is an example implementation of a Consumer.
func (*MyConsumer) Receive ¶
func (c *MyConsumer) Receive(message string)
Receive implements the Consumer interface
Click to show internal directories.
Click to hide internal directories.