Documentation ¶
Index ¶
- func MatchSubscribe(topic []byte, sub []byte) bool
- func ValidSubscribe(topic []byte) error
- func ValidTopic(topic []byte) error
- type Bee
- type Hive
- func (h *Hive) ListenAndServe(addr string) error
- func (h *Hive) OnConnect(fn func(*packet.Connect, *Bee) bool)
- func (h *Hive) OnDisconnect(fn func(*packet.DisConnect, *Bee))
- func (h *Hive) OnPublish(fn func(*packet.Publish, *Bee) bool)
- func (h *Hive) OnSubscribe(fn func(*packet.Subscribe, *Bee) bool)
- func (h *Hive) OnUnSubscribe(fn func(*packet.UnSubscribe, *Bee))
- func (h *Hive) Publish(pub *packet.Publish)
- func (h *Hive) Receive(conn net.Conn)
- func (h *Hive) Receive2(conn net.Conn)
- func (h *Hive) Serve(ln net.Listener)
- func (h *Hive) Subscribe(topic string, callback SubscribeCallback)
- type RetainNode
- type RetainTree
- type SubNode
- func (sn *SubNode) Callback(topics []string, pub *packet.Publish)
- func (sn *SubNode) ClearClient(clientId string)
- func (sn *SubNode) Publish(topics []string, subs map[string]packet.MsgQos)
- func (sn *SubNode) Subscribe(topics []string, clientId string, qos packet.MsgQos)
- func (sn *SubNode) SubscribeCallback(topics []string, callback SubscribeCallback)
- func (sn *SubNode) UnSubscribe(topics []string, clientId string)
- type SubTree
- func (st *SubTree) Callback(pub *packet.Publish)
- func (st *SubTree) ClearClient(clientId string)
- func (st *SubTree) Publish(topic []byte, subs map[string]packet.MsgQos)
- func (st *SubTree) Subscribe(topic []byte, clientId string, qos packet.MsgQos)
- func (st *SubTree) SubscribeCallback(topic []byte, callback SubscribeCallback)
- func (st *SubTree) UnSubscribe(topic []byte, clientId string)
- type SubscribeCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchSubscribe ¶
func ValidSubscribe ¶
func ValidTopic ¶
Types ¶
type Bee ¶
type Bee struct {
// contains filtered or unexported fields
}
func (*Bee) Disconnect ¶ added in v0.0.2
type Hive ¶
type Hive struct {
// contains filtered or unexported fields
}
func (*Hive) ListenAndServe ¶
func (*Hive) OnDisconnect ¶
func (h *Hive) OnDisconnect(fn func(*packet.DisConnect, *Bee))
func (*Hive) OnUnSubscribe ¶
func (h *Hive) OnUnSubscribe(fn func(*packet.UnSubscribe, *Bee))
func (*Hive) Subscribe ¶ added in v0.0.6
func (h *Hive) Subscribe(topic string, callback SubscribeCallback)
type RetainNode ¶
type RetainNode struct {
// contains filtered or unexported fields
}
func (*RetainNode) Fetch ¶
func (rn *RetainNode) Fetch(topics []string, cb func(clientId string, pub *packet.Publish))
func (*RetainNode) Retain ¶
func (rn *RetainNode) Retain(topics []string, clientId string, pub *packet.Publish) *RetainNode
type RetainTree ¶
type RetainTree struct {
// contains filtered or unexported fields
}
func (*RetainTree) Fetch ¶
func (rt *RetainTree) Fetch(topic []byte, cb func(clientId string, pub *packet.Publish))
func (*RetainTree) Retain ¶
func (rt *RetainTree) Retain(topic []byte, clientId string, pub *packet.Publish)
func (*RetainTree) UnRetain ¶
func (rt *RetainTree) UnRetain(clientId string)
type SubNode ¶
type SubNode struct {
// contains filtered or unexported fields
}
func (*SubNode) ClearClient ¶
func (*SubNode) SubscribeCallback ¶ added in v0.0.6
func (sn *SubNode) SubscribeCallback(topics []string, callback SubscribeCallback)
func (*SubNode) UnSubscribe ¶
type SubTree ¶
type SubTree struct {
// contains filtered or unexported fields
}
func (*SubTree) ClearClient ¶
func (*SubTree) SubscribeCallback ¶ added in v0.0.6
func (st *SubTree) SubscribeCallback(topic []byte, callback SubscribeCallback)
func (*SubTree) UnSubscribe ¶
type SubscribeCallback ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.