mqtt

package
v0.0.0-...-cf16b6f Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerConfig

type BrokerConfig struct {
	Hostname string `yaml:"hostname"`
	Port     uint16 `yaml:"port"`

	Username string `yaml:"username"`
	Password string `yaml:"password"`

	Topic string `yaml:"topic"`
}

type Client

type Client struct {
	pmqtt.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(broker *BrokerConfig, clientID, dataDir string, clean bool) (*Client, error)

func (*Client) Close

func (m *Client) Close() error

func (*Client) PublishUpdate

func (m *Client) PublishUpdate(topic string, sup *pb.StateUpdatePoint) pmqtt.Token

Jump to

Keyboard shortcuts

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