Documentation ¶
Index ¶
Constants ¶
View Source
const TransportName = "local"
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 queue as many unread messages as defined in the queue argument. The list of supported subscriptions must be given as a map in the topics argument, where the key is the name of the subscription topic, and the value of the map is type of the message 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.
func (*Local) WithAuthor ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.