mqtt

package
v0.73.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package mqtt provides an instrumented publisher for MQTT v5.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig(brokerURLs []*url.URL, clientID string) (autopaho.ClientConfig, error)

DefaultConfig provides a config with sane default and logging enabled on the callbacks.

Types

type Publisher

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

Publisher definition.

func New

New creates a publisher.

func (*Publisher) Disconnect

func (p *Publisher) Disconnect(ctx context.Context) error

Disconnect from the broker.

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, pub *paho.Publish) (*paho.PublishResponse, error)

Publish provides a instrumented publishing of a message.

Jump to

Keyboard shortcuts

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