mqttout

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mqttout contains the mqttOut node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTTOutConfig

type MQTTOutConfig struct {
	nodebase.MQTTConnConfig
	// Topic is the publish topic; when blank the message's topic metadata is used (Node-RED precedence).
	Topic string `json:"topic"`
	// QoS is the publish quality of service (0|1|2). A nil pointer
	// marks a blank config — Node-RED serializes blank qos as "" and
	// msg.qos is the fallback — so it stays distinct from explicit 0.
	QoS *int `json:"qos"`
	// Retain sets the MQTT retain flag on published messages. Nil
	// means the config was blank ("") and msg.retain is the fallback.
	Retain *bool `json:"retain"`
}

MQTTOutConfig holds configuration for the mqttOut node. The embedded MQTTConnConfig carries the connection block (broker address or an mqttBroker config-node id, credentials, clientID, clean session, keepalive, TLS and last-will fields).

type MQTTOutNode

type MQTTOutNode struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

MQTTOutNode publishes the message Data to a broker topic and passes the input through unchanged. Connections are shared per workflow via the host-state MQTTClientPool.

func NewMQTTOutNode

func NewMQTTOutNode(node nodestore.NodeInterface, config *MQTTOutConfig, host nodebase.NodeHost) *MQTTOutNode

NewMQTTOutNode creates a new mqttOut node

func (*MQTTOutNode) Execute

Execute serializes Data, publishes it and returns the input payload.

func (*MQTTOutNode) Validate

func (n *MQTTOutNode) Validate() error

Validate checks the mqttOut node configuration

Jump to

Keyboard shortcuts

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