Documentation
¶
Index ¶
Constants ¶
View Source
const ( DISCONNECTED = 0 CONNECTED = 1 )
Variables ¶
This section is empty.
Functions ¶
func MqttClient ¶
func MqttClient(s MqttSettings)
Types ¶
type IOMsg ¶
type IOMsg struct { Data []byte Raw []float32 Topic string Retain bool Qos byte MQTTts time.Time EnqueuedTs time.Time }
IOMsg is a struct used internally which either originates from or will be send to the wire
type LastWill ¶
LastWill defines the LastWill for MQTT. The LastWill will be submitted to the broker on connection and will be published on Disconnect.
type MqttSettings ¶
type MqttSettings struct { WaitGroup *sync.WaitGroup Transport string BrokerURL string BrokerPort int ClientID string Topics []string ToDeserializeCatRequestCh chan []byte ToDeserializeCatResponseCh chan []byte ToDeserializeCapabilitiesCh chan []byte ToDeserializeStatusCh chan []byte ToDeserializePingRequestCh chan []byte ToDeserializePingResponseCh chan []byte ToWire chan IOMsg Events *pubsub.PubSub LastWill *LastWill Logger *log.Logger }
Click to show internal directories.
Click to hide internal directories.