Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TopicConnectStatus emqx 客户端上下线通知 参考: https://docs.emqx.com/zh/enterprise/v4.4/advanced/system-topic.html#客户端上下线事件 TopicConnectStatus = ShareSubTopicPrefix + "$SYS/brokers/+/clients/#" TopicThing = ShareSubTopicPrefix + devices.TopicHeadThing + "/up/#" TopicOta = ShareSubTopicPrefix + devices.TopicHeadOta + "/up/#" TopicConfig = ShareSubTopicPrefix + devices.TopicHeadConfig + "/up/#" TopicSDKLog = ShareSubTopicPrefix + devices.TopicHeadLog + "/up/#" TopicShadow = ShareSubTopicPrefix + devices.TopicHeadShadow + "/up/#" TopicGateway = ShareSubTopicPrefix + devices.TopicHeadGateway + "/up/#" TopicExt = ShareSubTopicPrefix + devices.TopicHeadExt + "/up/#" )ShareSubTopicPrefix = "$share/dg.rpc/"
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(conf conf.DevLinkConf) error
Types ¶
type ConnectMsg ¶
type ConnectMsg struct { UserName string `json:"username"` Ts int64 `json:"ts"` Address string `json:"ipaddress"` ClientID string `json:"clientid"` Reason string `json:"reason"` }
登录登出消息
type DevSubHandle ¶
type Handle ¶
type Handle func(ctx context.Context) DevSubHandle
type MqttClient ¶
type MqttClient struct {
// contains filtered or unexported fields
}
func (*MqttClient) SubDevMsg ¶
func (d *MqttClient) SubDevMsg(handle Handle) error
Click to show internal directories.
Click to hide internal directories.