mqtt

package
v4.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MODULE = "mqtt"

Variables

View Source
var Client paho.Client

Functions

func Close

func Close()

func Open

func Open() paho.Token

func OpenBy

func OpenBy(fn paho.OpenConnectionFunc) paho.Token

func Publish

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

func Subscribe

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

func SubscribeExt added in v4.0.13

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

func SubscribeStruct added in v4.0.13

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