blob: 773604939fe8ead01e0084ab3fdcf9d6c4385cbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Package mqtt wraps Paho MQTT with a few quality-of-life features.
package mqtt
import (
mqtt "github.com/eclipse/paho.mqtt.golang"
)
type (
Client = mqtt.Client
Message = mqtt.Message
MessageHandler = mqtt.MessageHandler
)
const (
AtMostOnce byte = iota
AtLeastOnce
ExactlyOnce
)
const (
Retain = true
)
func NewClientOptions() *mqtt.ClientOptions {
return mqtt.NewClientOptions()
}
func NewClient(opts *mqtt.ClientOptions) mqtt.Client {
return mqtt.NewClient(opts)
}
|