mqtt

package
v2.0.0-dev.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMqttClientWrapper

func NewMqttClientWrapper(props map[string]interface{}) (clients.ClientWrapper, error)

Types

type MQTTClient

type MQTTClient struct {
	// contains filtered or unexported fields
}

func (*MQTTClient) CfgValidate

func (ms *MQTTClient) CfgValidate(props map[string]interface{}) error

func (*MQTTClient) Connect

func (ms *MQTTClient) Connect(connHandler MQTT.OnConnectHandler, lostHandler MQTT.ConnectionLostHandler) error

func (*MQTTClient) Disconnect

func (ms *MQTTClient) Disconnect() error

func (*MQTTClient) Publish

func (ms *MQTTClient) Publish(topic string, qos byte, retained bool, message []byte) error

func (*MQTTClient) Subscribe

func (ms *MQTTClient) Subscribe(topic string, qos byte, handler MQTT.MessageHandler) error

type MQTTConnectionConfig

type MQTTConnectionConfig struct {
	Server   string `json:"server"`
	PVersion string `json:"protocolVersion"`
	ClientId string `json:"clientid"`
	Uname    string `json:"username"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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