Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSubscribed = errors.New("topic is not subscribed")
Functions ¶
This section is empty.
Types ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local is a simple implementation of the transport.Transport interface using local channels.
func New ¶
New returns a new instance of the Local structure. The created transport can handle up to b unread messages before it is blocked. The list of supported subscriptions must be given as a map in s argument, where the key is the subscription's topic name, and the map value is the message type messages given as a nil pointer, e.g: (*Message)(nil).
func (*Local) Messages ¶
func (l *Local) Messages(topic string) chan transport.ReceivedMessage
Messages implements the transport.Transport interface.
Click to show internal directories.
Click to hide internal directories.