mqtt

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host string
	Port string
	User string
	Pass string
	CID  string
}

type MQTT

type MQTT struct {
	Config
	Messages chan Publish
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *MQTT

func (*MQTT) Connect

func (m *MQTT) Connect() error

func (*MQTT) Disconnect

func (m *MQTT) Disconnect()

func (*MQTT) Subscribe

func (m *MQTT) Subscribe(topic string)

type Publish

type Publish struct {
	Topic string
	ID    uint16
	Msg   string
}

Jump to

Keyboard shortcuts

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