mqttx

package
v1.2.33 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 10 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 {
	// contains filtered or unexported fields
}

func New

func New(addr, id string) *Client

func (*Client) AddTopic

func (c *Client) AddTopic(topic string, hFunc HandFunc)

func (*Client) AddTopics

func (c *Client) AddTopics(topics map[string]HandFunc)

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) ConnectWithAuthentication

func (c *Client) ConnectWithAuthentication(username, password string) error

func (*Client) Publish

func (c *Client) Publish(topic string, data []byte) error

func (*Client) Request

func (c *Client) Request(topic string, data []byte) ([]byte, error)

func (*Client) Stop

func (c *Client) Stop() error

func (*Client) Subscribe

func (c *Client) Subscribe(topic map[string]HandFunc) error

type EClient

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

func NewE

func NewE(addr, id, username, password string) *EClient

func (*EClient) AddTopic

func (c *EClient) AddTopic(topic string, hFunc HandFunc)

func (*EClient) AddTopics

func (c *EClient) AddTopics(topics map[string]HandFunc)

func (*EClient) Connect

func (c *EClient) Connect() error

func (*EClient) Publish

func (c *EClient) Publish(topic string, data []byte) error

func (*EClient) Request

func (c *EClient) Request(topic string, data []byte) ([]byte, error)

type HandFunc

type HandFunc func(topic, reply string, message []byte)

Jump to

Keyboard shortcuts

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