starter

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 11 Imported by: 0

README

yomo-rcvr-mqtt-starter

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

func NewBroker

func NewBroker(conf *BrokerConf) Broker

func (Broker) Run

func (b Broker) Run(handle func(topic string, payload []byte))

type BrokerConf

type BrokerConf struct {
	Addr           string
	Topics         []string
	Username       string
	Password       string
	ConnectTimeout int
	WaitTimeout    int
}
var DefaultConfig *BrokerConf = &BrokerConf{
	Addr:           "tcp://localhost:1883",
	Topics:         []string{"modbus", "test"},
	Username:       "admin",
	Password:       "public",
	ConnectTimeout: 60,
	WaitTimeout:    60,
}

Jump to

Keyboard shortcuts

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