Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBrokerClosed = errors.New("broker: broker closed")
ErrBrokerClosed indicates that the broker was closed by a call to Close.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker interface { // Publish publishes a Publishable message on the broker. Publish(ctx context.Context, message Publishable) error // StartConsumer consumes messages on a broker. This method is blocking and // will always return with ErrBrokerClosed after calls to Close. StartConsumer(handlers map[string]func([]byte) error) error // Close closes the broker. Close() error }
Broker is capable of publishing and consuming Publishable messages.
Click to show internal directories.
Click to hide internal directories.