shared

package
v4.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package shared contains docs fields that need to be shared across old and new component implementations, it needs to be separate from the parent package in order to avoid circular dependencies (for now).

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