safemqtt

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogMQTTMessageHandler added in v0.1.13

func LogMQTTMessageHandler(name string, handler ErrMQTTMessageHandler) mqtt.MessageHandler

Types

type Client

type Client interface {
	SafePublish(topic string, qos byte, retained bool, payload interface{}) mqtt.Token
	SafeSubscribe(topic string, qos byte, callback mqtt.MessageHandler) mqtt.Token
	SafeUnsubscribe(topics ...string) mqtt.Token
}

Client is bridge between our app and MQTT

func InitMQTTClient

func InitMQTTClient(cfg *config.MQTT, id string) (Client, error)

type ErrMQTTMessageHandler added in v0.1.13

type ErrMQTTMessageHandler func(client mqtt.Client, msg mqtt.Message) error

Jump to

Keyboard shortcuts

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