Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotReply = errors.New("cannot reply")
View Source
var ErrDisconnected = errors.New("disconnected from the broker")
ErrDisconnected occurs when trying to do something that requires a connection but one was unavailable
View Source
var Rcv = make(chan Message)
Functions ¶
Types ¶
type Broker ¶
type Broker interface { Publish(ctx context.Context, event string, data interface{}) error Subscribe(ctx context.Context, events []string, messages chan<- Message) error }
Broker is an interface describing message brokers
type IOPacket ¶
type IOPacket struct { E string `codec:"event"` D interface{} `codec:"data"` }
IOPacket represents a JSON packet transmitted through an RW broker
Click to show internal directories.
Click to hide internal directories.