mqtt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTTChannel

type MQTTChannel struct {
	*channels.BaseChannel
	// contains filtered or unexported fields
}

MQTTChannel implements the Channel interface for MQTT-based communication.

func NewMQTTChannel

func NewMQTTChannel(bc *config.Channel, cfg *config.MQTTSettings, b *bus.MessageBus) (*MQTTChannel, error)

NewMQTTChannel creates a new MQTT channel instance.

func (*MQTTChannel) Send

func (c *MQTTChannel) Send(_ context.Context, msg bus.OutboundMessage) ([]string, error)

Send publishes a response to the client via MQTT.

func (*MQTTChannel) Start

func (c *MQTTChannel) Start(ctx context.Context) error

Start connects to the MQTT broker and begins listening for inbound messages.

func (*MQTTChannel) Stop

func (c *MQTTChannel) Stop(_ context.Context) error

Stop disconnects from the MQTT broker.

Jump to

Keyboard shortcuts

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