client

package
v0.0.0-...-d1b775e Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MqttClient

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

func NewMqttClientWithConfig

func NewMqttClientWithConfig(broker string, clientId string, username string, password string) *MqttClient

func (*MqttClient) Connect

func (m *MqttClient) Connect() error

connect to mqtt

func (*MqttClient) Disconnect

func (m *MqttClient) Disconnect()

func (*MqttClient) Publish

func (m *MqttClient) Publish(topic string, payload interface{}, qos byte)

func (*MqttClient) Subscribe

func (m *MqttClient) Subscribe(topic string, callback mqtt.MessageHandler, qos byte)

type Topic

type Topic struct {
	Topic string
	Cb    mqtt.MessageHandler
}

Jump to

Keyboard shortcuts

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