mqtt

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(opts *cli.Options) error

Read is the entry point function for performing read operations in RabbitMQ.

This is where we verify that the provided arguments and flag combination makes sense/are valid; this is also where we will perform our initial conn.

func Write

func Write(opts *cli.Options) error

Write is the entry point function for performing write operations in MQTT.

This is where we verify that the passed args and flags combo makes sense, attempt to establish a connection, parse protobuf before finally attempting to perform the write.

Types

type MQTT

type MQTT struct {
	Options *cli.Options
	Client  pahomqtt.Client
	MsgDesc *desc.MessageDescriptor
	// contains filtered or unexported fields
}

func (*MQTT) Read

func (m *MQTT) Read() error

func (*MQTT) Write

func (m *MQTT) Write(value []byte) error

Write is a wrapper for amqp Publish method. We wrap it so that we can mock it in tests, add logging etc.

Jump to

Keyboard shortcuts

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