mqtt

package module
v0.0.0-...-f8e1f49 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 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 Client

type Client struct {
	mqtt.Client
}

func New

func New(brokerAddress string, clientName string) (mqttClient Client, err error)

func (Client) Disconnect

func (mqttClient Client) Disconnect(quiesce uint)

func (Client) PublishStringToTopic

func (mqttClient Client) PublishStringToTopic(topic string, data string) error

func (Client) PublishToTopic

func (mqttClient Client) PublishToTopic(topic string, data []byte) error

func (Client) SubscribeToTopic

func (mqttClient Client) SubscribeToTopic(topic string, callback func(msg Message)) error

type Message

type Message struct {
	Topic   string
	Payload []byte
}

Jump to

Keyboard shortcuts

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