mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
add function to create new MQTTMessage
This commit is contained in:
@@ -22,6 +22,15 @@ type MQTTMessageCreate struct {
|
|||||||
Payload []byte
|
Payload []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewMQTTMessage(topic string, qos byte, retained bool, payload []byte) MQTTMessage {
|
||||||
|
return MQTTMessage{
|
||||||
|
topic: topic,
|
||||||
|
qos: qos,
|
||||||
|
retained: retained,
|
||||||
|
payload: payload,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (mm MQTTMessage) Duplicate() bool {
|
func (mm MQTTMessage) Duplicate() bool {
|
||||||
// TODO(jwetzell): implement?
|
// TODO(jwetzell): implement?
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user