mqtt

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultClientId = "plumber"
	BackendName     = "mqtt"
)

Variables

View Source
var (
	ErrInvalidAddress = errors.New("URI scheme must be ssl:// or tcp://")
	ErrWriteTimeout   = errors.New("write timeout must be greater than 0")
	ErrEmptyTopic     = errors.New("Topic cannot be empty")
)

Functions

This section is empty.

Types

type MQTT

type MQTT struct {
	// contains filtered or unexported fields
}

func New added in v1.0.0

func New(connOpts *opts.ConnectionOptions) (*MQTT, error)

func (*MQTT) Close added in v1.0.0

func (m *MQTT) Close(_ context.Context) error

func (*MQTT) DisplayError added in v1.0.0

func (m *MQTT) DisplayError(msg *records.ErrorRecord) error

DisplayError will parse an Error record and print (pretty) output to STDOUT

func (*MQTT) DisplayMessage added in v1.0.0

func (m *MQTT) DisplayMessage(cliOpts *opts.CLIOptions, msg *records.ReadRecord) error

DisplayMessage will parse a Read record and print (pretty) output to STDOUT

func (*MQTT) Name added in v1.0.0

func (m *MQTT) Name() string

func (*MQTT) Read

func (m *MQTT) Read(ctx context.Context, readOpts *opts.ReadOptions, resultsChan chan *records.ReadRecord, errorChan chan *records.ErrorRecord) error

func (*MQTT) Relay added in v1.0.0

func (m *MQTT) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, errorCh chan<- *records.ErrorRecord) error

func (*MQTT) Test added in v1.0.0

func (m *MQTT) Test(_ context.Context) error

func (*MQTT) Tunnel added in v1.4.0

func (m *MQTT) Tunnel(ctx context.Context, tunnelOpts *opts.TunnelOptions, tunnelSvc tunnel.ITunnel, errorCh chan<- *records.ErrorRecord) error

func (*MQTT) Write

func (m *MQTT) Write(ctx context.Context, writeOpts *opts.WriteOptions, errorCh chan<- *records.ErrorRecord, messages ...*records.WriteRecord) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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