Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Heartbeat ¶
type Heartbeat struct { Topic string Client *MQTTClient OnHeartbeatMissed func(error) LastHeartbeat time.Time MaxDurationMs int64 // contains filtered or unexported fields }
Heartbeat for MQTT Client Will Subscribe and Publish to MQTT
type MQTTClient ¶
type MQTTClient struct { MQTTServerHost string MQTTServerPort int MQTTClient mqtt.Client Heartbeat *Heartbeat OnConnectHandler mqtt.OnConnectHandler }
MQTTClient contains the data needed to connect the client
func GetMQTTClient ¶
func GetMQTTClient(onConnectHandler mqtt.OnConnectHandler) *MQTTClient
GetMQTTClient creates the mqttclient and returns it
Click to show internal directories.
Click to hide internal directories.