Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TopicMatch ¶
TopicMatch 返回topic和topic filter是否
TopicMatch returns whether the topic and topic filter is matched.
Types ¶
type MessageQueue ¶
type MessageQueue interface { // Publish publishes arguments to the given topic subscribers // Publish block only when the buffer of one of the subscribers is full. Publish(topic string, args ...interface{}) // Close unsubscribe all subscribers from given topic Close(topic string) // Subscribe subscribes to the given topic Subscribe(topic string, fn interface{}, options ...interface{}) error // Unsubscribe unsubscribe handler from the given topic Unsubscribe(topic string, fn interface{}) error // Stat Stat() (stats Stats, err error) // Purge Purge() }
MessageQueue implements publish/subscribe messaging paradigm
func New ¶
func New(handlerQueueSize int) MessageQueue
New creates new MessageQueue queueSize sets buffered channel length per subscriber
Click to show internal directories.
Click to hide internal directories.