Documentation ¶
Index ¶
- Constants
- Variables
- func Close()
- func Load() error
- func Open() error
- func OpenBy(fn paho.OpenConnectionFunc) error
- func Publish(topic string, payload any) paho.Token
- func PublishRaw(topic string, payload []byte, retain bool, qos byte) error
- func SetOptions(opts Options)
- func Store() error
- func Subscribe(topic string, cb Handler) paho.Token
- func SubscribeJson(topic string, cb func(topic string, data map[string]any)) paho.Token
- func SubscribeStruct[T any](topic string, cb func(topic string, data *T)) paho.Token
- type Handler
- type Options
Constants ¶
View Source
const ENV = "IOT_MASTER_MQTT_"
Variables ¶
View Source
var Client paho.Client
Functions ¶
func OpenBy ¶
func OpenBy(fn paho.OpenConnectionFunc) error
func PublishRaw ¶ added in v3.4.0
func SetOptions ¶ added in v3.1.0
func SetOptions(opts Options)
func SubscribeJson ¶ added in v3.4.0
Types ¶
Click to show internal directories.
Click to hide internal directories.