mqtt

package
v4.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MODULE = "mqtt"

Variables

View Source
var Client paho.Client
View Source
var CustomOpenConnectionFn paho.OpenConnectionFunc

Functions

func OpenBy

func OpenBy(fn paho.OpenConnectionFunc) paho.Token

func Publish

func Publish(topic string, payload any) paho.Token

func Shutdown added in v4.1.0

func Shutdown() error

func Startup added in v4.1.0

func Startup() error

func Subscribe

func Subscribe(filter string, cb func(topic string, payload []byte)) paho.Token

func SubscribeExt added in v4.1.0

func SubscribeExt[T any](filter string, cb func(topic string, value *T))

func SubscribeStruct added in v4.1.0

func SubscribeStruct[T any](filter string, cb func(topic string, data *T)) paho.Token

Types

This section is empty.

Jump to

Keyboard shortcuts

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