mqtt

package
v0.0.0-...-2ca7a8e Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTT

type MQTT struct {
	// contains filtered or unexported fields
}

func New

func New(s *settings.Settings) (m *MQTT, err error)

func NewInsecure

func NewInsecure(s *settings.Settings) (m *MQTT, err error)

NewInsecure sets up a new session without TLS

func (*MQTT) PublishMessage

func (m *MQTT) PublishMessage(topic string, payload string) error

sendMessage sends an MQTT message.

func (*MQTT) SetHandler

func (m *MQTT) SetHandler(f func(Message))

func (*MQTT) Subscribe

func (m *MQTT) Subscribe(topic string)

type Message

type Message struct {
	Topic   string
	Payload string
}

Jump to

Keyboard shortcuts

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