lib

package module
v0.0.0-...-c5db5d4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 4 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMQTTClient

func CreateMQTTClient(mqttBroker string) (mqtt.Client, error)

func Prefixify

func Prefixify(topicPrefix, subtopic string) string

Types

type BaseMQTTBridge

type BaseMQTTBridge struct {
	MQTTClient  mqtt.Client
	TopicPrefix string
}

func (*BaseMQTTBridge) PublishBytesMQTT

func (bridge *BaseMQTTBridge) PublishBytesMQTT(subtopic string, message []byte, retained bool)

func (*BaseMQTTBridge) PublishJSONMQTT

func (bridge *BaseMQTTBridge) PublishJSONMQTT(subtopic string, obj any, retained bool)

func (*BaseMQTTBridge) PublishStringMQTT

func (bridge *BaseMQTTBridge) PublishStringMQTT(subtopic string, message string, retained bool)

Jump to

Keyboard shortcuts

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