mqtthelper

package module
v0.0.0-...-51d5919 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(clientId string, urlStr string, onconnect func(c mqtt.Client)) (mqtt.Client, error)

Types

type Handler

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

func New

func New() *Handler

func (*Handler) Publish

func (h *Handler) Publish(clientID, topic string, qos byte, retained bool, payload interface{}) error

func (*Handler) Subscribe

func (h *Handler) Subscribe(clientID, topic string, qos byte, messageHandler func(client mqtt.Client, msg mqtt.Message)) error

func (*Handler) SubscribeWithOnConnect

func (h *Handler) SubscribeWithOnConnect(clientID string, onConnect func(c mqtt.Client)) error

Jump to

Keyboard shortcuts

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