mqtt

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 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 DryRunClient added in v1.2.0

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

func NewDryRun added in v1.2.0

func NewDryRun() *DryRunClient

func (*DryRunClient) Close added in v1.2.0

func (d *DryRunClient) Close()

func (*DryRunClient) Connect added in v1.2.0

func (d *DryRunClient) Connect(timeout time.Duration) error

func (*DryRunClient) Publish added in v1.2.0

func (d *DryRunClient) Publish(topic string, qos byte, retain bool, payload []byte) error

func (*DryRunClient) SetAvailability added in v1.2.0

func (d *DryRunClient) SetAvailability(topic string, onlinePayload []byte)

func (*DryRunClient) Subscribe added in v1.4.0

func (d *DryRunClient) Subscribe(topic string, qos byte, handler func(topic string, payload []byte)) error

type MQTTClient

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

func New

func New(o *MQTT.ClientOptions) *MQTTClient

func (*MQTTClient) Close

func (m *MQTTClient) Close()

func (*MQTTClient) Connect

func (m *MQTTClient) Connect(timeout time.Duration) error

func (*MQTTClient) Publish

func (m *MQTTClient) Publish(topic string, qos byte, retain bool, payload []byte) error

func (*MQTTClient) SetAvailability

func (m *MQTTClient) SetAvailability(topic string, onlinePayload []byte)

func (*MQTTClient) Subscribe added in v1.4.0

func (m *MQTTClient) Subscribe(topic string, qos byte, handler func(topic string, payload []byte)) error

type Publisher added in v1.2.0

type Publisher interface {
	SetAvailability(topic string, onlinePayload []byte)
	Connect(timeout time.Duration) error
	Publish(topic string, qos byte, retain bool, payload []byte) error

	Subscribe(topic string, qos byte, handler func(topic string, payload []byte)) error

	Close()
}

Jump to

Keyboard shortcuts

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