mqtt

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: GPL-3.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 Client

type Client struct {
	URI      *url.URL
	ClientID string
	Prefix   string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(uri *url.URL, client_id string, prefix string) (*Client, error)

func (*Client) PublishJSON added in v0.12.0

func (client *Client) PublishJSON(topic string, val interface{}) error

func (*Client) PublishMany

func (client *Client) PublishMany(topic string, values map[string]interface{}) error

func (*Client) PublishRaw added in v0.12.0

func (client *Client) PublishRaw(topic string, val interface{}) error

func (*Client) Subscribe

func (client *Client) Subscribe(topic string, qos byte, callback MessageHandler) error

type Message

type Message mqtt.Message

type MessageHandler

type MessageHandler func(client *Client, message Message)

Jump to

Keyboard shortcuts

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