2019-10-20 02:21:38 +02:00
2019-10-20 00:14:48 +02:00
2019-10-20 02:21:38 +02:00
2019-10-19 23:40:41 +02:00
2019-10-19 23:40:41 +02:00
2019-10-20 02:21:38 +02:00
2019-10-20 02:21:38 +02:00
2019-10-20 02:21:38 +02:00
2019-10-20 02:21:38 +02:00
2019-10-20 02:21:38 +02:00
2019-10-20 00:22:05 +02:00

mqtt

CI Code Coverage GoDoc

An mqtt client for Go that improves usability over the paho.mqtt.golang library it wraps. Made for 🤖.

installation

go get github.com/lucacasonato/mqtt
import "github.com/lucacasonato/mqtt"
// or
import (
    "github.com/lucacasonato/mqtt"
)

usage

creating a client & connecting

client, err := mqtt.NewClient(mqtt.ClientOptions{
    // required
    Servers: []string{
        "tcp://test.mosquitto.org:1883",
    },

    // optional
    ClientID: "my-mqtt-client",
    Username: "admin",
    Password: "***",
    AutoReconnect: true,
})
if err != nil {
    panic(err)
}

err = client.Connect(context.WithTimeout(2 * time.Second))
if err != nil {
    panic(err)
}

disconnecting from a client

client.Disconnect()
Description
A nice MQTT client library that wraps paho.mqtt.golang
Readme MIT 128 KiB
Languages
Go 99.4%
Makefile 0.6%