mqtt

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mqtt

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

func New

func New(ctx context.Context, brokerUrl string, clientId string, username string, password string) (client *Mqtt, err error)

func (*Mqtt) Publish

func (this *Mqtt) Publish(topic string, qos byte, retained bool, payload []byte) error

func (*Mqtt) Subscribe

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

func (*Mqtt) Unsubscribe

func (this *Mqtt) Unsubscribe(topic string) error

type Subscription

type Subscription struct {
	Topic   string
	Handler paho.MessageHandler
}

Jump to

Keyboard shortcuts

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