mqtt

package module
v0.0.0-...-3c9f417 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 6 Imported by: 0

README

yago-mqtt

go get github.com/hulklab/yago-coms/mqtt

config

[mqtt]
broker = "tcp://127.0.0.1:80"
username = ""
password = ""

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
}

func (Log) Printf

func (l Log) Printf(format string, v ...interface{})

func (Log) Println

func (l Log) Println(v ...interface{})

type MqttConn

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

func Ins

func Ins(id ...string) *MqttConn

func NewMqttConn

func NewMqttConn(broker, username, password string) *MqttConn

func (*MqttConn) Pub

func (m *MqttConn) Pub(topic string, value string, qos int) error

func (*MqttConn) Sub

func (m *MqttConn) Sub(topic string, qos int, cb func(value string)) error

Jump to

Keyboard shortcuts

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