mqttclient

package
v0.8.18 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MqttService

type MqttService struct {
	Endpoint     string
	User         string
	Password     string
	ClientID     string
	Cleansession bool
	Qos          byte

	Logger *zap.Logger
	Client mqtt.Client
	// contains filtered or unexported fields
}

func InitMqtt

func InitMqtt(logger *zap.Logger) (*MqttService, error)

func (*MqttService) LogMessage

func (m *MqttService) LogMessage(c mqtt.Client, msg mqtt.Message)

func (*MqttService) OnConnect

func (m *MqttService) OnConnect(c mqtt.Client)

func (*MqttService) Sub

func (m *MqttService) Sub(topic string, handle mqtt.MessageHandler)

Jump to

Keyboard shortcuts

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