Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Subscribe ¶
func (c *Client) Subscribe(topic string, h OnDataFunc) Unsubscribe
type MessageItem ¶
type OnDataFunc ¶
type OnDataFunc func(MessageItem)
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router 支持对同一topic的多个订阅
func (*Router) Add ¶
func (r *Router) Add(id string, topic string, f OnDataFunc) Unsubscribe
Click to show internal directories.
Click to hide internal directories.