mqtt

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTT_T

type MQTT_T struct {
	PublishChan chan MessageT
	// contains filtered or unexported fields
}

func (*MQTT_T) Start

func (m *MQTT_T) Start(conf MqttConfT)

func (*MQTT_T) SubscribeToSubTopic

func (m *MQTT_T) SubscribeToSubTopic(subtopic string) (c chan MessageT)

SubscribeToTopic returns a channel which will receive any MQTT messages published to the given subtopic of the configured Base_Topic

type MessageT

type MessageT struct {
	Subtopic string
	Qos      byte
	Retained bool
	Payload  interface{}
}

type MqttConfT

type MqttConfT struct {
	Base_Topic string
	Broker     string
	Port       int
	Username   string
	Password   string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL