blob: 025ebb4e87fca5d1e48383cb331867dbe497f42e (
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
30
31
32
33
|
// SPDX-FileCopyrightText: 2020 Ethel Morgan
//
// SPDX-License-Identifier: MIT
// 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)
}
|