mqtt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(ctx context.Context, cfg Config) (net.Conn, error)

Dial creates a mqtt client connection with a topic to subscribe and a topic to publish

Types

type Config

type Config struct {
	Pub           string
	Sub           string
	ClientOptions *mqtt.ClientOptions
	Logger        Logger
}

Config holds the MQTT client configuration and topics

type Logger

type Logger interface {
	Trace(args ...interface{})
	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
}

Logger interface

Jump to

Keyboard shortcuts

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