mqttconf

package
v3.59.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package mqtt contains supporting utils shared between MQTT reader and writer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WillFieldSpec

func WillFieldSpec() docs.FieldSpec

WillFieldSpec defines a last will message registration.

Types

type Will

type Will struct {
	Enabled  bool   `json:"enabled" yaml:"enabled"`
	QoS      uint8  `json:"qos" yaml:"qos"`
	Retained bool   `json:"retained" yaml:"retained"`
	Topic    string `json:"topic" yaml:"topic"`
	Payload  string `json:"payload" yaml:"payload"`
}

Will holds configuration for the last will message that the broker emits, should benthos exit abnormally.

func EmptyWill

func EmptyWill() Will

EmptyWill returns an empty will, meaning last will message should not be registered.

func (*Will) Validate

func (w *Will) Validate() error

Validate the Will configuration and return nil or error accordingly.

Jump to

Keyboard shortcuts

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