mqtt

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Opts         Opts
	StateManager *baby.StateManager
}

Connection - MQTT context

func NewConnection

func NewConnection(opts Opts) *Connection

NewConnection - constructor

func (*Connection) Run

func (conn *Connection) Run(manager *baby.StateManager, ctx utils.GracefulContext)

Run - runs the mqtt connection handler

type Opts

type Opts struct {
	BrokerURL string
	ClientID  string

	Username string
	Password string

	TopicPrefix string
}

Opts - holds configuration needed to establish connection to the broker

Jump to

Keyboard shortcuts

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