mqtt_simple

package module
v0.0.0-...-07e36d2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageCallback

type MessageCallback func(topic, value string)

type MqttMessage

type MqttMessage struct {
	Topic string `json:"topic"`
	Value string `json:"value"`
}

type MqttSimpleClient

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

func NewMqttSimpleClient

func NewMqttSimpleClient(broker, clientid, user, password string) *MqttSimpleClient

func (*MqttSimpleClient) Connect

func (b *MqttSimpleClient) Connect() error

func (*MqttSimpleClient) Disconnect

func (b *MqttSimpleClient) Disconnect(timeout uint)

func (*MqttSimpleClient) Publish

func (b *MqttSimpleClient) Publish(topic, value string, qos byte, retained bool) error

func (*MqttSimpleClient) SetCleanSession

func (b *MqttSimpleClient) SetCleanSession(state bool)

func (*MqttSimpleClient) Subscribe

func (b *MqttSimpleClient) Subscribe(topic string, qos byte) (<-chan *MqttMessage, error)

func (*MqttSimpleClient) SubscribeMultiple

func (b *MqttSimpleClient) SubscribeMultiple(topics []string, qos byte) (<-chan *MqttMessage, error)

func (*MqttSimpleClient) SubscribeToEverything

func (b *MqttSimpleClient) SubscribeToEverything(qos byte) (<-chan *MqttMessage, error)

Jump to

Keyboard shortcuts

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