mqtt

package
v0.0.0-...-aff13a8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Topic   string
	Payload string
}

type MQTT

type MQTT struct {
	Events chan *Event
	// contains filtered or unexported fields
}

func New

func New(opts *Options) (*MQTT, error)

func (*MQTT) Publish

func (m *MQTT) Publish(endpoint, payload string) (err error)

type Options

type Options struct {
	Broker   string
	User     string
	Password string
	Topic    string
	QoS      int
	Retain   bool
}

Jump to

Keyboard shortcuts

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