mqttclient

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func InitMqtt

func InitMqtt(c *MqttConf) (err error)

func Publish

func Publish(topic string, payload []byte) error

func Subscribe

func Subscribe(ctx context.Context, topic string, h mqtt.MessageHandler) (err error)

Types

type MqttConf

type MqttConf struct {
	Addr     string
	ClientId string
	UserName string
	Password string
}

type MqttWrapperClient

type MqttWrapperClient struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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